thank you for the links. they have been a great help but I did what I believe they were telling me to do, and although the form still works it does not validate the inputs. The code now looks like the following:
Code:
<p><font size="4">Join Our Mailing List!</font><br />
<br />
<font size="3">In doing so you will be able to receive notifications as new properties become available, sometimes even before they are listed on our website.</font></p>
<form action="tellus.php3">
<table width="800">
</table>
<table bordercolor="#dddddd" border="3" bgcolor="#cccc99">
<tbody>
<tr>
<td align="left" width="45%" colspan="2"><font size="4" face="arial rounded MT bold"> INFORMATION:</font> </td>
</tr>
<br />
<tr>
<td align="right" width="45%"><font size="3" face="arial rounded MT bold"><font color="#ff0000">*</font>First Name</font></td>
<td align="left" width="55%"><input type="text" size="35" name="firstname" /></td>
</tr>
<tr>
<td align="right" width="45%"><font size="3" face="arial rounded MT bold"><font color="#ff0000">*</font>Last Name</font></td>
<td align="left" width="55%"><input type="text" size="35" name="lastname" /></td>
</tr>
<tr>
<td align="right" width="45%"><font size="3" face="arial rounded MT bold"><font color="#ff0000">*</font>Email Address</font></td>
<td align="left" width="55%"><input type="text" size="45" name="emailaddress" /></td>
</tr>
<tr>
<td align="right" width="45%"><font size="3" face="arial rounded MT bold"><font color="#ff0000">*</font>Phone Number</font></td>
<td align="left" width="55%"><input type="text" size="35" name="phonenumber" /></td>
</tr>
</tbody>
</table>
<font size="2" face="arial rounded MT bold"><font color="#ff0000">*</font>is required</font><br />
<br />
<input type="hidden" value="firstname,lastname,emailaddress,phonenumber" name="required" /> <input type="reset" value="Reset" /><input type="submit" value="Submit" />
</form>
<script language="JavaScript" type="text/javascript">
var frmvalidator = new Validator("subscription");
frmvalidator.addValidation("firstname","req","Please enter your First Name");
frmvalidator.addValidation("firstname","maxlen=20",
"Max length for firstname is 20");
frmvalidator.addValidation("firstname","alpha");
frmvalidator.addValidation("lastname","req");
frmvalidator.addValidation("lastname","maxlen=20");
frmvalidator.addValidation("emailaddress","maxlen=50");
frmvalidator.addValidation("emailaddress","req");
frmvalidator.addValidation("emailaddress","email");
frmvalidator.addValidation("phonenumber","maxlen=50");
frmvalidator.addValidation("phonenumber","numeric");
</script>
<p> We will <u>never</u> sell or disclose your information to any third party.</p>
<p> </p>
<p> <br />
<br />
<br />
<br />
</p>
Note that as this is an editable frame I added the javascript that is supposed to go between head and /head in the main.html. As there are other lines in the head is there a particular place that it should go? Also, I understand that I should be validating it on the server side but I do not know how to do this and I would be quite happy with most of them being validated due to the fact that they are going to be screened anyway by us.
Thank you so much.
PS I have been googling but just can't figure it out. Sorry.
Bookmarks