I am using Javascript to validate a form. I am using a querytstring and PHP to make the page call itself and process the form data. The problem is, if javascript validates the info and presents an alert box telling the user a field is missing, then clicking on the ok button submits the form!! So no matter whether the form is complete or not, it is still submitted and processed. How do i stop this from happening??? How do i keep the field from processing when there is a missing field? I was using a javascript code snippet in like this:
IF(error){
alert("the form is not complete");
return false;
}else{
return true;
}
The PHP form simple says:
<FORM Action="<?php PHP_SELF?>?do=process" method="post" onsubmit.....>
Any help would be greatly appreciated.
-ro'