Hello all.
I am unable to solve two problems when creating a contacts form using dreamweaver CS3. My other problem is posted under the heading, "Setting text field to accept only alphabetical characters".
For this posting, can someone please tell me how to modify my code, pasted below, so that the "Contact Tel" and "Confirm Contact Tel" text fields are compared and must be identical before the user can successfully submit the form.
Thank you
Here's my current code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" method="post" action="">
<p>First Name
<span id="sprytextfield1">
<input type="text" name="First_Name" id="First_Name" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span></span></p>
<p>Last Name
<span id="sprytextfield2">
<input type="text" name="First_Name2" id="First_Name2" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span></span></p>
<p> </p>
<p>Contact Tel
<span id="sprytextfield3">
<input type="text" name="Contact_Tel" id="Contact_Tel" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Please enter numerical characters only.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span></span></p>
<p>Confirm Contact Tel<span id="sprytextfield4">
<input type="text" name="Confirm_Contact_Tel" id="Confirm_Contact_Tel" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Please enter numerical characters only.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span></span></p>
<p> </p>
<p>
<input type="submit" name="Submit_button" id="Submit_button" value="Submit" />
</p>
</form>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {minChars:2, maxChars:15});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {minChars:2, maxChars:15});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "integer", {minChars:5, maxChars:15});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "integer", {minChars:5, maxChars:15});
//-->
</script>
</body>
</html>