Hello. I have a form that has three onSubmit functions to the form. The problem is that two of the functions have a return value while the other doesn't. I can't get the form to run all three scripts correctly onSubmit. Here is an example of the form tag:
The verify() function does not return a true or false. If that script could be modified to return a true or false it may be problem solved. Here is the verify function:HTML Code:<form action="registration.php" method="post" name="reg_form" id="packages" onsubmit="return Form1_Validator(this) && checkTheBox(); verify(this.email, this.emailtwo);">
ThanksCode:<script type = "text/javascript"> function checkTheBox() { var flag = 0; for (var i = 0; i< 5; i++) { if(document.reg_form["Package[]"][i].checked){ flag ++; } } for (var i = 0; i< 10; i++) { if(document.reg_form["ALaCarte[]"][i].checked){ flag ++; } } if (flag == 0) { alert ("You must check at least one checkbox!!"); return false; } return true; } </script>


Reply With Quote
Bookmarks