I have a JSP file which when loaded to the browser,displayed all the form fields,etc. I had written some wrong things like accessing a variable which is never defined and one more thing like writing a random string without any semicolon as well
The form gets loaded and the validation checks and all happen unless the code reaches that point.
After that the code exits and there is no error or exception message in the UI as well as the console.
I need to know how the compilation process happen in the first place it self if the code which i wrote in one of the validation function is not syntactically correct in java.
EDIT :-
The following is the code snippet with all the variables declared except the address variable:-
alert("Came before the if check");
if (firstName=="" || lastName=="" || address=="" || state=="null" || city=="" || amt=="" || prof=="" )
{
alert ( "Fields marked * are mandatory" );
document.registration.firstname.focus();
return false;
}
alert("came after address");
if (contact==""||contact.length<10||contact.length>10)
{
alert ( "Please enter 10 digit contact no." );
document.registration.mobileNo.focus();
return false;
}
So the first alert comes and the code never reaches the next alert which was needed to validate the contact field in the form
If I change the field to "add" instead of "address" which is defined before,then both the alerts are displayed along with the validation being done.