Dragonwalker
07-14-2010, 01:23 PM
Hello,
I was wondering whether someone could let me know if there is an easy wany to add script, probably javascript to the following code to validate all fields at the same time and let the people know on the page which fields they need to correct. I have found scripts but they show the script but not where it would fit within the whole html code.
this code goes within a page program so that is why it does not have html body or head etc.
Thank you in advance.
Rachel
<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" name="firstname" size="35" /></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" name="lastname" size="35" /></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" name="emailaddress" size="45" /></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" name="phonenumber" size="35" /></td>
</tr>
</tbody>
</table>
<font size="2" face="arial rounded MT bold"><font color="#ff0000">*</font>is required</font><br />
<br />
<input type="hidden" name="required" value="firstname,lastname,emailaddress,phonenumber" /> <input type="reset" value="Reset" /><input type="submit" value="Submit" />
</form>
<p> We will <u>never</u> sell or disclose your information to any third party.</p>
<p> </p>
<p> <br />
<br />
<br />
<br />
</p>
I was wondering whether someone could let me know if there is an easy wany to add script, probably javascript to the following code to validate all fields at the same time and let the people know on the page which fields they need to correct. I have found scripts but they show the script but not where it would fit within the whole html code.
this code goes within a page program so that is why it does not have html body or head etc.
Thank you in advance.
Rachel
<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" name="firstname" size="35" /></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" name="lastname" size="35" /></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" name="emailaddress" size="45" /></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" name="phonenumber" size="35" /></td>
</tr>
</tbody>
</table>
<font size="2" face="arial rounded MT bold"><font color="#ff0000">*</font>is required</font><br />
<br />
<input type="hidden" name="required" value="firstname,lastname,emailaddress,phonenumber" /> <input type="reset" value="Reset" /><input type="submit" value="Submit" />
</form>
<p> We will <u>never</u> sell or disclose your information to any third party.</p>
<p> </p>
<p> <br />
<br />
<br />
<br />
</p>