Well, where you attach your validation code here:
Code:
<input name="email" type="text" class="text" id="email"
onblur="MM_validateForm('name','','R','email','','RisEmail');
return document.MM_returnValue" />
so the
only time the script checks the fields is when you leave the e-mail box.
As long as you stay out of the e-mail box, the code never runs. Even if it does run,it does not keep the user from ignoring it and submitting the form anyway.
If you want the validation to occur when the user tries to submit the form and you want the script to stop the form from being submitted if there are errors, you need to attach your validation script to to the onsubmit event handler of the form itself.
Code:
<form action="contact.php" method="post"
[B]onSubmit=="MM_validateForm('name','','R','email','','RisEmail');
return document.MM_returnValue"[/B]
enctype="application/x-www-form-urlencoded">
The "return document.MM_returnValue" will keep the form from being submitted if there are errors on the page.
Remember that the user can turn off JS, etc, so you should never trust this type of validation. You have to check the input again in the server script that handles the submission. JS validation helps remind users to properly fill out a form, but it is lousy security.
Note:
remember that 'hidden' fields are not secure.
Code:
<input name="hiddenField" type="hidden" id="hiddenField" value="mailto:ciril_sep17@hotmail.com" />
PS: The highlighting of the input boxes using mouseover is not done well. Highlighting the name input box shifts all the other boxes down and looks amateurish.