Thursday, May 28, 2009

varibale not defined from javascript validation

if when validating a form with javascript you have:

if(errorMsg!= ""){
alert(errorMsg);
return false;
} else {
form.submit();
}

from the line with the name of the form, try using document.form.submit();

No comments: