I am working on a project and need to do some client side validation.I am doing all validations by calling the onsubmit() method.
The problem that I am facing is that the validation runs just fine when I put into comments a few other statements but not otherwise.
My code:
var speak1=document.forms["form"]["speak1"].valueb = checkSpeakLanguages(speak1);if(b==false){ return false;}
which calls checkSpeakLanguage works properly.
But the following code works only when the above is put in comments:
var m= document.forms["form"]["maritalStatus"].valueb = checkMaritalStatus(m);if(b==false){ return false;}
Please help me. Please tell me why both the second part does not work when the other is present.