gaspowerediguana
asked on
How can I set two fields to verify each other upon submit?
Please forgive me, but I'm new to web development and I've only taken the basics of HTML courses. I've used FrontPage to design a form so members of a homeowner's association website can have their security code for the electronic doors on the condo buildings changed. This form simply emails the results to a specified email address. The user's enter a 4-digit code twice on this form. I want the users to be stopped if the codes do not match. I've spent the last hour looking through possible solutions on here without much luck, though I've learned a ton in the process.
Here is the coding from the site from the beginning of the form to the end. Again, I used FrontPage to do this, so forgive the mess.
</table>
<FORM METHOD="POST" ACTION="--WEBBOT-SELF--" onSubmit="return FrontPage_Form1_Validator( this)" language="JavaScript" name="FrontPage_Form1">
<!--webbot bot="SaveResults" u-file="../_private/formrs lt.htm" s-format="HTML/DL" s-label-fields="TRUE" b-reverse-chronology="FALS E" s-email-format="HTML/BR" s-email-address="board@hid denhillsco ndos.com" b-email-label-fields="TRUE " b-email-subject-from-field ="FALSE" s-email-subject="Secured Entry Code Change" s-date-format="%d-%b-%Y" s-time-format="%I:%M:%S %p %Z" s-builtin-fields="Date Time" u-confirmation-url="codeco nfirmation .htm" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">Please provide the following information:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">First Name &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; Last Name</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="First_Name" SIZE=20>
<INPUT NAME="Last_Name" SIZE=35><BR>Building # & nbsp;  ; &nb sp; & nbsp;  ; &nb sp; & nbsp;  ; Unit #</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<select size="1" name="Building_Number">
<option>101 NW 8th Street</option>
<option>105 NW 8th Street</option>
</select>
<select size="1" name="Unit_Number">
<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
<option>105</option>
<option>106</option>
<option>107</option>
<option>108</option>
<option>201</option>
<option>202</option>
<option>203</option>
<option>204</option>
<option>205</option>
<option>206</option>
<option>207</option>
<option>208</option>
<option>301</option>
<option>302</option>
<option>303</option>
<option>304</option>
<option>305</option>
<option>306</option>
<option>307</option>
<option>308</option>
</select><BR>Phone #</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="Phone_Number" SIZE=13> <BR>Email Address</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="Email_Address" SIZE=35> </font> </P>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The code guests use to
contact you when they arrive is uniform for everyone at Hidden Hills, which is
"1" followed by the unit number (i.e. 1105 or 1302). Your <b>
secured-entry code </b>is your personal code to enter the building. This
code would be
entered as follows: "0" followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">Please choose a
four-digit code to use to enter the building. We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.
Something this simple would be easy for unwanted guest to see you enter on the
keypad and obtain access themselves; keeping your code more complicated yet easy
for you to remember is the key, as well as being aware of those that are around
you when you enter the building.</font></p>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">Please provide your new Secured-Entry Code:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><INPUT TYPE=password NAME="NewCode" SIZE=4 MAXLENGTH=4> <BR>Please confirm or retype your new Secured-Entry Code:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><INPUT TYPE=password NAME="NewCodeConfirm" SIZE=4 MAXLENGTH=4> <BR>Please provide the phone number for the Secured-Entry System to dial when you receive guest:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="SecuredEntryPhone" SIZE=11></font></P>
<P style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">(You can also set this
to your cell phone number; this way you receive calls when someone is calling
you from the front door no matter where you are.)</font></P>
<P style="margin-top: 0; margin-bottom: 0"> </P>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT TYPE=submit VALUE="Submit">
<INPUT TYPE=reset VALUE="Reset"> </font>
</p>
</FORM>
<hr></BODY>
Any suggestions for a pathetic newbie?
Here is the coding from the site from the beginning of the form to the end. Again, I used FrontPage to do this, so forgive the mess.
</table>
<FORM METHOD="POST" ACTION="--WEBBOT-SELF--" onSubmit="return FrontPage_Form1_Validator(
<!--webbot bot="SaveResults" u-file="../_private/formrs
<font face="Times New Roman">Please provide the following information:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">First Name &nbs
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="First_Name" SIZE=20>
<INPUT NAME="Last_Name" SIZE=35><BR>Building # &
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<select size="1" name="Building_Number">
<option>101 NW 8th Street</option>
<option>105 NW 8th Street</option>
</select>
<select size="1" name="Unit_Number">
<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
<option>105</option>
<option>106</option>
<option>107</option>
<option>108</option>
<option>201</option>
<option>202</option>
<option>203</option>
<option>204</option>
<option>205</option>
<option>206</option>
<option>207</option>
<option>208</option>
<option>301</option>
<option>302</option>
<option>303</option>
<option>304</option>
<option>305</option>
<option>306</option>
<option>307</option>
<option>308</option>
</select><BR>Phone #</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="Phone_Number" SIZE=13> <BR>Email Address</font></P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">
<INPUT NAME="Email_Address" SIZE=35> </font> </P>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The code guests use to
contact you when they arrive is uniform for everyone at Hidden Hills, which is
"1" followed by the unit number (i.e. 1105 or 1302). Your <b>
secured-entry code </b>is your personal code to enter the building. This
code would be
entered as follows: "0" followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">Please choose a
four-digit code to use to enter the building. We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.
Something this simple would be easy for unwanted guest to see you enter on the
keypad and obtain access themselves; keeping your code more complicated yet easy
for you to remember is the key, as well as being aware of those that are around
you when you enter the building.</font></p>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">Please provide your new Secured-Entry Code:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><INPUT TYPE=password NAME="NewCode" SIZE=4 MAXLENGTH=4> <BR>Please confirm or retype your new Secured-Entry Code:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><INPUT TYPE=password NAME="NewCodeConfirm" SIZE=4 MAXLENGTH=4> <BR>Please provide the phone number for the Secured-Entry System to dial when you receive guest:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="SecuredEntryPhone" SIZE=11></font></P>
<P style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">(You can also set this
to your cell phone number; this way you receive calls when someone is calling
you from the front door no matter where you are.)</font></P>
<P style="margin-top: 0; margin-bottom: 0"> </P>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT TYPE=submit VALUE="Submit">
<INPUT TYPE=reset VALUE="Reset"> </font>
</p>
</FORM>
<hr></BODY>
Any suggestions for a pathetic newbie?
ASKER
I've had FrontPage look through every page to find this script and came up with nothing; which doesn't surprise me. I should be able to see the folders with the frontpage extensions and theme files and I'm not, and I don't know why.
ok, then you need to write you own little script and add it to the head section.
I'm not sure how to make FP use this to validate before it enters FrontPage_Form1_Validator.
Let me see if I can track down an answer for you.
I'm not sure how to make FP use this to validate before it enters FrontPage_Form1_Validator.
Let me see if I can track down an answer for you.
ASKER
I'm not opposed to scrapping the page and starting over. It's really a simple form, but I have the consistent problem of users not matches these numbers, which baffles me in the first place. ;) I appreciate any help you can offer. :)
I, personally don't use FP, I could probably write you this whole page in < 10 min from scratch w/o FP and
having the validation. Let me work on it for a few...
Do you have an asp page that it sends the data to?
having the validation. Let me work on it for a few...
Do you have an asp page that it sends the data to?
ASKER
I was simply having it email the results to a specific email address, plus it filed the results into an html file. Here is a screen print. I found the Form Name in the Form Properties, but I can't find the file itself anywhere.
http://www.hiddenhillscondos.com/images/frontpage.jpg
http://www.hiddenhillscondos.com/images/frontpage.jpg
ASKER
I created a new page with a basic custom form, not using FrontPage's Form Wizard. Here is what the code came out to be.
<html>
<head>
<meta http-equiv="Content-Langua ge" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor. Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Secured-Entry Code Change</title>
<meta name="Microsoft Theme" content="network 111, default">
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="_private/form_resu lts.htm" s-format="HTML/BR" s-label-fields="TRUE" b-reverse-chronology="FALS E" s-email-format="TEXT/PRE" s-email-address="board@hid denhillsco ndos.com" b-email-label-fields="TRUE " b-email-subject-from-field ="FALSE" s-email-subject="Secured-E ntry Code Change" s-builtin-fields u-confirmation-url="reside nts/codeco nfirmation .htm" --><h3 style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#808000" face="Times New Roman" size="5">Secured-Entry System</font></h3>
<h3 style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#808000" face="Times New Roman">Code Change</font></h3>
<p style="margin-top: 0; margin-bottom: 0" align="center">
</p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The standard of security that we offer
is a programmable-key system, which means that the code that the owner
selects can be deleted from the system if they suspect that someone has
found out their code. If you need to have your secured-entry code
changed, please fill out the following form and click submit. We will
contact you as soon as possible to confirm your change, and once again when
the change has been made.</font></p>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">Please provide the following information:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">First Name &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; Last Name</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="First_Name" SIZE=20>
<INPUT NAME="Last_Name" SIZE=35><BR>Building # & nbsp;  ; &nb sp; & nbsp;  ; &nb sp; & nbsp;  ; Unit #</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<select size="1" name="Building_Number">
<option>101 NW 8th Street</option>
<option>105 NW 8th Street</option>
</select>
<select size="1" name="Unit_Number">
<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
<option>105</option>
<option>106</option>
<option>107</option>
<option>108</option>
<option>201</option>
<option>202</option>
<option>203</option>
<option>204</option>
<option>205</option>
<option>206</option>
<option>207</option>
<option>208</option>
<option>301</option>
<option>302</option>
<option>303</option>
<option>304</option>
<option>305</option>
<option>306</option>
<option>307</option>
<option>308</option>
</select><BR>Phone #</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="Phone_Number" SIZE=13> <BR>Email Address</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="Email_Address" SIZE=35> </font> </P>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The code guests use to
contact you when they arrive is uniform for everyone at Hidden Hills, which is
"1" followed by the unit number (i.e. 1105 or 1302). Your <b>
secured-entry code </b>is your personal code to enter the building. This
code would be
entered as follows: "0" followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">Please choose a
four-digit code to use to enter the building. We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.
Something this simple would be easy for unwanted guest to see you enter on the
keypad and obtain access themselves; keeping your code more complicated yet easy
for you to remember is the key, as well as being aware of those that are around
you when you enter the building.</font></p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
<b>provide</b> your new secured-entry code:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Secured-En try Code" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><input type="password" name="Code" size="4" maxlength="4"></font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
<b>confirm</b> your new secured-entry code:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Secured-En try Code" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="4" --><input type="password" name="Code_Confirm" size="4" maxlength="4"></font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
provide the <b>phone number</b> for the Secured-Entry System to dial when you
receive guest:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Phone" b-value-required="TRUE" i-maximum-length="12" --><input type="text" name="Code_Phone" size="12" maxlength="12"></font></p>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman" size="2">(You can set this to any number,
including your cell phone number; this way you receive calls when someone is
calling you from the front door no matter where you are.)</font></p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<input type="submit" value="Set/Change my code" name="Submit"><input type="reset" value="Reset this form" name="Reset"></font></p>
</form>
</body>
</html>
What do you think?
<html>
<head>
<meta http-equiv="Content-Langua
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Secured-Entry Code Change</title>
<meta name="Microsoft Theme" content="network 111, default">
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" u-file="_private/form_resu
<font color="#808000" face="Times New Roman" size="5">Secured-Entry System</font></h3>
<h3 style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#808000" face="Times New Roman">Code Change</font></h3>
<p style="margin-top: 0; margin-bottom: 0" align="center">
</p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The standard of security that we offer
is a programmable-key system, which means that the code that the owner
selects can be deleted from the system if they suspect that someone has
found out their code. If you need to have your secured-entry code
changed, please fill out the following form and click submit. We will
contact you as soon as possible to confirm your change, and once again when
the change has been made.</font></p>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">Please provide the following information:</font></P>
<P style="margin-top: 0; margin-bottom: 0">
</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">First Name &nbs
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="First_Name" SIZE=20>
<INPUT NAME="Last_Name" SIZE=35><BR>Building # &
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<select size="1" name="Building_Number">
<option>101 NW 8th Street</option>
<option>105 NW 8th Street</option>
</select>
<select size="1" name="Unit_Number">
<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
<option>105</option>
<option>106</option>
<option>107</option>
<option>108</option>
<option>201</option>
<option>202</option>
<option>203</option>
<option>204</option>
<option>205</option>
<option>206</option>
<option>207</option>
<option>208</option>
<option>301</option>
<option>302</option>
<option>303</option>
<option>304</option>
<option>305</option>
<option>306</option>
<option>307</option>
<option>308</option>
</select><BR>Phone #</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="Phone_Number" SIZE=13> <BR>Email Address</font></P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">
<INPUT NAME="Email_Address" SIZE=35> </font> </P>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">The code guests use to
contact you when they arrive is uniform for everyone at Hidden Hills, which is
"1" followed by the unit number (i.e. 1105 or 1302). Your <b>
secured-entry code </b>is your personal code to enter the building. This
code would be
entered as follows: "0" followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">
<font size="2" face="Times New Roman">Please choose a
four-digit code to use to enter the building. We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.
Something this simple would be easy for unwanted guest to see you enter on the
keypad and obtain access themselves; keeping your code more complicated yet easy
for you to remember is the key, as well as being aware of those that are around
you when you enter the building.</font></p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
<b>provide</b> your new secured-entry code:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Secured-En
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
<b>confirm</b> your new secured-entry code:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Secured-En
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">Please
provide the <b>phone number</b> for the Secured-Entry System to dial when you
receive guest:</font></p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<!--webbot bot="Validation" s-display-name="Phone" b-value-required="TRUE" i-maximum-length="12" --><input type="text" name="Code_Phone" size="12" maxlength="12"></font></p>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman" size="2">(You can set this to any number,
including your cell phone number; this way you receive calls when someone is
calling you from the front door no matter where you are.)</font></p>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0"><font face="Times New Roman">
<input type="submit" value="Set/Change my code" name="Submit"><input type="reset" value="Reset this form" name="Reset"></font></p>
</form>
</body>
</html>
What do you think?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tells me that when the form is submitted, it will be processed by the script
named FrontPage_Form1_Validator.
If you know where this script is, modify it to compare the fields NewCode
and NewCodeConfirm.
something like this:
if (NewCode.value != NewCodeConfirm.value) {
return false;
} else {
return true;
}