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/formrslt.htm" s-format="HTML/DL" s-label-fields="TRUE" b-reverse-chronology="FALSE" s-email-format="HTML/BR" s-email-address="board@hiddenhillscondos.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="codeconfirmation.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">
&nbsp;</P>
<P style="margin-top: 0px; margin-bottom: 0px">
<font face="Times New Roman">First Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">&nbsp;</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
&quot;1&quot; followed by the unit number (i.e. 1105 or 1302).&nbsp; Your <b>
secured-entry code </b>is your personal code to enter the building.&nbsp; This
code would be
entered as follows: &quot;0&quot; followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">&nbsp;</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.&nbsp; We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.&nbsp;
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">
&nbsp;</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">&nbsp;</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?
gaspowerediguanaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eddie ShipmanAll-around developerCommented:
This : onSubmit="return FrontPage_Form1_Validator(this)"
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;
}
gaspowerediguanaAuthor Commented:
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.
Eddie ShipmanAll-around developerCommented:
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.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

gaspowerediguanaAuthor Commented:
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. :)
Eddie ShipmanAll-around developerCommented:
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?
gaspowerediguanaAuthor Commented:
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
gaspowerediguanaAuthor Commented:
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-Language" 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_results.htm" s-format="HTML/BR" s-label-fields="TRUE" b-reverse-chronology="FALSE" s-email-format="TEXT/PRE" s-email-address="board@hiddenhillscondos.com" b-email-label-fields="TRUE" b-email-subject-from-field="FALSE" s-email-subject="Secured-Entry Code Change" s-builtin-fields u-confirmation-url="residents/codeconfirmation.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">
    &nbsp;</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.&nbsp; 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">
&nbsp;</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">
&nbsp;</P>
<P style="margin-top: 0; margin-bottom: 0">
<font face="Times New Roman">First Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">&nbsp;</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
&quot;1&quot; followed by the unit number (i.e. 1105 or 1302).&nbsp; Your <b>
secured-entry code </b>is your personal code to enter the building.&nbsp; This
code would be
entered as follows: &quot;0&quot; followed by the code (i.e. 07681 or 02474).</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="justify">&nbsp;</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.&nbsp; We suggest that you choose a
code that is specific to you and not a generic code such as '1234' or '9999'.&nbsp;
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">&nbsp;</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-Entry 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-Entry 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">&nbsp;</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?
Eddie ShipmanAll-around developerCommented:
Well, depending upon your host's (ISP) server capabilities, I'd say dump FP and go with a real
web development system like ASP or PHP.

But, I would also suggest moving this to the FP topic area as I really know nothing about how FP
handles things when the form is posted to itself like this one.

You can do one of three things:
1. Post a new question in the FP topic area: http://www.experts-exchange.com/Applications/MS_Office/FrontPage/
   with a link to this question, asking for help.
2. Go to Community Support and ask that the question be moved to the above TA.
    http://www.experts-exchange.com/Community_Support/
3. Ask a new question in the FP TA and request this one be deleted in Community Support.
   (I won't object to a deletion request)

Good Luck...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.