HI everybody
I am writing java script code it's working fine in IE browser and not working fine in Mozilla
code:
what is wrong with that it gives alert message in mozilla but post next page when we click ok in alart box (actually when we click OK in alert box it display same page )
please send me any suggestion with that.
Cheers
ramana
I am writing java script code it's working fine in IE browser and not working fine in Mozilla
code:
Code:
<SCRIPT LANGUAGE="JavaScript">
function verify() {
var themessage = "You are required to complete the following fields: ";
if (document.form.title.value=="") {
themessage = themessage + " - Class Title";
}
//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form.submit();
} else {
alert(themessage);
event.returnValue=false;
}
}
</script>
<form enctype="multipart/form-data" method="post" name="form" onSubmit="verify()" action="admin_addclass2.php">
//fields here
</form>
please send me any suggestion with that.
Cheers
ramana
Comment