I have a validation script that works fine with Internet explorer but has problem while executing action with Mozilla. Blow are my validation scripts and submit (action scripts) : <script language="javascript"> function check() { var first_name=reservation.first_name.value; var surname=reservation.surname.value; var email=reservation.email.value; var security=reservation.security.value; var h_security=reservation.h_security.value; if(first_name==null || first_name=="") { alert("Please Enter Your First Name"); reservation.first_name.focus(); return false; } else if(surname==null || surname=="") { alert("Please Enter Your Surname"); reservation.surname.focus(); return false; } else if(email==null || email=="") { alert("Please Enter Your Email Address"); reservation.email.focus(); return false; } else if(security!=h_security) { alert("Please Enter Correct Security No"); reservation.security.focus(); return false; } return true; } </script> Submit Button Scripts : <input name="B1" type="submit" class="forms" value="Submit" onclick="return check()"> What's the problem guys ????? Is it because I have other scripts above the one I am having problem with ??
Hey brajeshnepal, What exactly is reservation? Is it a form object declared above function? Try after changing var first_name=reservation.first_name.value; to var first_name=document.reservation.first_name.value; May be it works for you.