PDA

View Full Version : Forms validation help please ...


craighj
11-21-2002, 07:22 PM
Hi there. Am just not coming right with form validation. Please tell me where I'm going wrong. Here's the code ...
<div id="LayerForm" style="position:absolute; width:431px; height:415px; z-index:2; left: 37px; top: 109px">
<table width="610" border="0" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td colspan="2"><img src="images/white1.gif" border=0 alt="" height="3"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"> I would love to know how you'll be celebrating your wedding
&amp; <br>
to help you make your dreams come true! <br>
<br>
cellular number: +27 82 415 8601<br>
<br>
Please fill out the following form and we will contact you shortly.</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" align="left" valign="top">
<form method="POST"
action="/cgi-sys/formmail.pl" name="mtpform">
name: <img src="spacer.gif" width="1" height="1">
<input type="text" name="realname" onBlur="MM_validateForm('realname','','R','email','','RisEmail','comments','','R');return document.MM_returnValue">
<br>
e-mail:<img src="spacer.gif" width="1" height="1">
<input type="text" name="email">
<br>
<br>
comments/questions:<br>
<textarea name="comments" cols="40" rows="5"></textarea>
<br>
<img src="spacer.gif" width="140" height="15">
<input type="submit" name="submit" value="submit">
<br>
<br>
<input type="hidden" name="redirect" value="http://www.margarettilling.com/thankyou.htm">
<input type="hidden" name="subject" value="Form Mail">
<input type="hidden" name="recipient" value="margaret@margarettilling.com">
</form>
</td>
</tr>
</table>
</div>

requestcode
11-21-2002, 11:52 PM
Not seeing your script the only thing I can suggest is that you use onChange instead of onBlur for your text fields. onBlur tends to cause to many problems.

beetle
11-22-2002, 07:03 AM
fValidate! (http://www.peterbailey.net/fValidate)