I have this javascript function in the head section:
<script language="javascript">
function checkform()
{
if (document.mailform.naam.value == "" or (document.mailform.comment.value == "" or (document.mailform.email.value == ""
{
alert("Make sure all required fields are filled in!"
return false;
}
else
return true;
}
</script>
-----------
This is my form:
<form action=mailpromo.asp method=post name=mailform onsubmit="checkform()">...
<input type=submit value="Send me that information!">
</form>
-------------
but when i click on the submit button, the actionpage is always opened even if the checked fields are empty. It seems he won't execute the function...
Can you tell me where i made the mistake?
Thanx,
Smarty
<script language="javascript">
function checkform()
{
if (document.mailform.naam.value == "" or (document.mailform.comment.value == "" or (document.mailform.email.value == ""
{
alert("Make sure all required fields are filled in!"
return false;
}
else
return true;
}
</script>
-----------
This is my form:
<form action=mailpromo.asp method=post name=mailform onsubmit="checkform()">...
<input type=submit value="Send me that information!">
</form>
-------------
but when i click on the submit button, the actionpage is always opened even if the checked fields are empty. It seems he won't execute the function...
Can you tell me where i made the mistake?
Thanx,
Smarty