- - Code, Content, and Presentation
- ---- Form validation
wruk999 - 8:36 pm on Mar 2, 2003 (gmt 0)
It will be much easier and works a treat.
|function Form_Validator(theForm) |
if (theForm.realname.value == "")
alert("Please enter a value for the \"Name\" field.");
add this into the action line:
|<form method="post" action="/cgi-bin/yourscript.pl" name="theForm" onSubmit="return Form_Validator(theForm)"> |
Never had experience of what you are using..but this will NOT allow a user to submit if the required fields are blank..everytime they do they just get an error box back! Sweet!
Brought to you by WebmasterWorld: http://www.webmasterworld.com