Hi
I'm struggling finding a reason why this is happening in IE7...
I have a simple form such as:
When not entering anything in the email field the javascript detects it and the alert message is displayed BUT as soon as you click OK the form is submitted/processed to the action page "submit.htm ".
Does anyone know why this is happening under IE7 it does work fine with Firefox though...?
The same happens for many of my forms.
Thanks for any input, I'm really struggling at the moment
I'm struggling finding a reason why this is happening in IE7...
I have a simple form such as:
Code:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt) {
with (field) {
if (value==null||value=="") {
alert(alerttxt);
return false;
}
else {
return true;
}
}
}
function validate_form(thisform) {
with (thisform) {
if (validate_required(email,"Email must be filled out!")==false) {
email.focus();
return false;
}
}
}
</script>
</head>
<body>
<form action="submit.htm" onsubmit="return validate_form(this)" method="post">
Email: <input type="text" name="email" size="30"> <input type="submit" value="Submit">
</form>
</body>
</html>
Does anyone know why this is happening under IE7 it does work fine with Firefox though...?
The same happens for many of my forms.
Thanks for any input, I'm really struggling at the moment
Comment