nissan240zx
Programmer
Hello All,
i am working on a ASP form with onSubmit javascript validation.
All the validations works except for few of them.
The ones for checkbox doesnt work, which is "option1" & "agree".
I am also trying to validate a field for Alpha only - which is "assoc_name".
Please help.
Thanks in advance,
Nissan
A good programmer is someone who looks both ways before crossing a one-way street. - Doug Linder
i am working on a ASP form with onSubmit javascript validation.
All the validations works except for few of them.
The ones for checkbox doesnt work, which is "option1" & "agree".
I am also trying to validate a field for Alpha only - which is "assoc_name".
Please help.
Thanks in advance,
Nissan
Code:
function ValidateForm(){
if (document.frm.assoc_name.value=="") {
alert("Please enter Sales Associate Name.")
document.frm.assoc_name.focus()
return false }
if (document.frm.option1.value == "") {
alert("Please check why did customer choose not to follow rules.")
document.frm.option1.focus()
return false }
if (document.frm.agree.value=="") {
alert("You must agree to our terms & conditions, please check the checkbox.")
document.frm.agree.focus()
return false }
}
A good programmer is someone who looks both ways before crossing a one-way street. - Doug Linder