Confirm Email Address in Form (UNGENT, URGENT, URGENT)

Discussion in 'Microsoft Frontpage' started by Guest, Dec 2, 2005.

  1. Guest

    Guest Guest

    As stated in my last post, I already tried that, but it doesn't work. Can
    someone pleasy type the code so I can cut and paste it, as I have spent an
    entire day working on this detail to no avail and am way behind schedule?

    Again, I have a form asking for considerable information including email
    address with confirmation. One field is "email_address" and the other is
    "confirm_email". I tried pasting in the code:

    "<input type="submit" onclick="if (sponsor_email.value ==
    sponsor_confirm_email.value) { return true; } else { alert('Email addresses
    do not match!'); sponsor_confirm_email.focus(); return false; } "
    value="Submit" >"

    That doesn't work, as it accepts both the right and wrong email addresses
    without prompting on the error. I also tried the Password Javascript and
    that doesn't work either. Can someone please help me with the right code to
    confirm email address in forms?
    --
    Thanks a million. Michelle
     
    Guest, Dec 2, 2005
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    Try

    <input type="submit" onclick="if (email_address.value ==
    confirm_email.value) { return true; } else { alert('Email addresses
    do not match!'); confirm_email.focus(); return false; } "
    value="Submit" >"


    "Michelle" wrote:

    > As stated in my last post, I already tried that, but it doesn't work. Can
    > someone pleasy type the code so I can cut and paste it, as I have spent an
    > entire day working on this detail to no avail and am way behind schedule?
    >
    > Again, I have a form asking for considerable information including email
    > address with confirmation. One field is "email_address" and the other is
    > "confirm_email". I tried pasting in the code:
    >
    > "<input type="submit" onclick="if (sponsor_email.value ==
    > sponsor_confirm_email.value) { return true; } else { alert('Email addresses
    > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > value="Submit" >"
    >
    > That doesn't work, as it accepts both the right and wrong email addresses
    > without prompting on the error. I also tried the Password Javascript and
    > that doesn't work either. Can someone please help me with the right code to
    > confirm email address in forms?
    > --
    > Thanks a million. Michelle
     
    Guest, Dec 2, 2005
    #2
    1. Advertisements

  3. Michelle,

    The script below would be perfect for your needs.
    It says "Password Verifier" (which was the oringal intent/use of the script)
    but it will work just as well for email; all it does is compare two fields
    and gives an "alert" if they don't match.

    I've changed the variables and field names to suit your purpose. All you do
    is copy and paste to the correct place in your code (Frontpage code view).
    To be sure the copy/paste works, copy this from the newsgroup message into
    Notepad; then pasted to your code.

    You just need to paste the form fields to the correct place in your form in
    the <body>, and paste the script to the <head> of your code.

    Add the onSubmit="return checkPw(this)" bit to your opening form tag

    <!-- TWO STEPS TO INSTALL PASSWORD VERIFIER:

    1. Copy the coding into the HEAD of your HTML document
    2. Add the last code into the BODY of your HTML document -->

    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Original: Carey Walker () -->

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    function checkPw(form) {
    email1 = form.email_address.value;
    email2 = form.confirm_email.value;


    if (email1 != email2) {
    alert ("\nYou did not enter the same email address twice. Please try
    again.")
    return false;
    }
    else return true;
    }

    // End -->
    </script>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <form onSubmit="return checkPw(this)">
    <center>
    <table border=0>
    <tr>
    <td>Password:</td><td><input type="text" name="email_address"
    size="10"></td>
    </tr>
    <tr>
    <td>Re-enter:</td><td><input type="text" name="confirm_email"
    size="10"></td>
    </tr>
    <tr>
    <td colspan=2 align=center><input type="submit" value="Submit!"></td>
    </tr>
    </table>
    </form>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 1.13 KB -->


    Hope this works and ends up being what you need.


    "Michelle" <> wrote in message
    news:...
    > As stated in my last post, I already tried that, but it doesn't work. Can
    > someone pleasy type the code so I can cut and paste it, as I have spent an
    > entire day working on this detail to no avail and am way behind schedule?
    >
    > Again, I have a form asking for considerable information including email
    > address with confirmation. One field is "email_address" and the other is
    > "confirm_email". I tried pasting in the code:
    >
    > "<input type="submit" onclick="if (sponsor_email.value ==
    > sponsor_confirm_email.value) { return true; } else { alert('Email
    > addresses
    > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > value="Submit" >"
    >
    > That doesn't work, as it accepts both the right and wrong email addresses
    > without prompting on the error. I also tried the Password Javascript and
    > that doesn't work either. Can someone please help me with the right code
    > to
    > confirm email address in forms?
    > --
    > Thanks a million. Michelle
     
    Andrew Murray, Dec 2, 2005
    #3
  4. Guest

    Guest Guest

    I just tried it, it doesn't work either.
    --
    Thanks a million. Michelle


    "Dan L" wrote:

    > Try
    >
    > <input type="submit" onclick="if (email_address.value ==
    > confirm_email.value) { return true; } else { alert('Email addresses
    > do not match!'); confirm_email.focus(); return false; } "
    > value="Submit" >"
    >
    >
    > "Michelle" wrote:
    >
    > > As stated in my last post, I already tried that, but it doesn't work. Can
    > > someone pleasy type the code so I can cut and paste it, as I have spent an
    > > entire day working on this detail to no avail and am way behind schedule?
    > >
    > > Again, I have a form asking for considerable information including email
    > > address with confirmation. One field is "email_address" and the other is
    > > "confirm_email". I tried pasting in the code:
    > >
    > > "<input type="submit" onclick="if (sponsor_email.value ==
    > > sponsor_confirm_email.value) { return true; } else { alert('Email addresses
    > > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > > value="Submit" >"
    > >
    > > That doesn't work, as it accepts both the right and wrong email addresses
    > > without prompting on the error. I also tried the Password Javascript and
    > > that doesn't work either. Can someone please help me with the right code to
    > > confirm email address in forms?
    > > --
    > > Thanks a million. Michelle
     
    Guest, Dec 2, 2005
    #4
  5. Guest

    Guest Guest

    Thank you dear for your hard work, but it still doesn't work. If I typed 2
    separate email addresses and click "submit", it still accepts the wrong email
    address.
    --
    Thanks a million. Michelle


    "Andrew Murray" wrote:

    > Michelle,
    >
    > The script below would be perfect for your needs.
    > It says "Password Verifier" (which was the oringal intent/use of the script)
    > but it will work just as well for email; all it does is compare two fields
    > and gives an "alert" if they don't match.
    >
    > I've changed the variables and field names to suit your purpose. All you do
    > is copy and paste to the correct place in your code (Frontpage code view).
    > To be sure the copy/paste works, copy this from the newsgroup message into
    > Notepad; then pasted to your code.
    >
    > You just need to paste the form fields to the correct place in your form in
    > the <body>, and paste the script to the <head> of your code.
    >
    > Add the onSubmit="return checkPw(this)" bit to your opening form tag
    >
    > <!-- TWO STEPS TO INSTALL PASSWORD VERIFIER:
    >
    > 1. Copy the coding into the HEAD of your HTML document
    > 2. Add the last code into the BODY of your HTML document -->
    >
    > <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
    >
    > <SCRIPT LANGUAGE="JavaScript">
    > <!-- Original: Carey Walker () -->
    >
    > <!-- This script and many more are available free online at -->
    > <!-- The JavaScript Source!! http://javascript.internet.com -->
    >
    > <!-- Begin
    > function checkPw(form) {
    > email1 = form.email_address.value;
    > email2 = form.confirm_email.value;
    >
    >
    > if (email1 != email2) {
    > alert ("\nYou did not enter the same email address twice. Please try
    > again.")
    > return false;
    > }
    > else return true;
    > }
    >
    > // End -->
    > </script>
    >
    > <!-- STEP TWO: Copy this code into the BODY of your HTML document -->
    >
    > <form onSubmit="return checkPw(this)">
    > <center>
    > <table border=0>
    > <tr>
    > <td>Password:</td><td><input type="text" name="email_address"
    > size="10"></td>
    > </tr>
    > <tr>
    > <td>Re-enter:</td><td><input type="text" name="confirm_email"
    > size="10"></td>
    > </tr>
    > <tr>
    > <td colspan=2 align=center><input type="submit" value="Submit!"></td>
    > </tr>
    > </table>
    > </form>
    >
    > <p><center>
    > <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    > by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    > </center><p>
    >
    > <!-- Script Size: 1.13 KB -->
    >
    >
    > Hope this works and ends up being what you need.
    >
    >
    > "Michelle" <> wrote in message
    > news:...
    > > As stated in my last post, I already tried that, but it doesn't work. Can
    > > someone pleasy type the code so I can cut and paste it, as I have spent an
    > > entire day working on this detail to no avail and am way behind schedule?
    > >
    > > Again, I have a form asking for considerable information including email
    > > address with confirmation. One field is "email_address" and the other is
    > > "confirm_email". I tried pasting in the code:
    > >
    > > "<input type="submit" onclick="if (sponsor_email.value ==
    > > sponsor_confirm_email.value) { return true; } else { alert('Email
    > > addresses
    > > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > > value="Submit" >"
    > >
    > > That doesn't work, as it accepts both the right and wrong email addresses
    > > without prompting on the error. I also tried the Password Javascript and
    > > that doesn't work either. Can someone please help me with the right code
    > > to
    > > confirm email address in forms?
    > > --
    > > Thanks a million. Michelle

    >
    >
    >
     
    Guest, Dec 2, 2005
    #5
  6. Guest

    Bob Lehmann Guest

    It would be very helpful if you put your page up on the Web, so someone
    could look at the whole picture. And a more complete description of "doesn't
    work" would also be helpful.

    Anyway, I don't think you can cancel a form submit from the onclick of a
    submit button.

    So, 2 things....
    1. Move the script to the onsubmit event of the form tag.

    2. Make sure the script part is all on one line. You can get some funkiness
    sometimes in scripts with linebreaks if you're not careful.

    You will, of course have to supply the correct action. And, if you're using
    FP automagical validation, this won't work without tweakage - See my first
    remark.
    <form method=post action="" onsubmit="if (this.email_address.value ==
    this.confirm_email.value) { return true; } else { alert('Email addresses do
    not match!'); this.sponsor_confirm_email.focus(); return false; }">

    Bob Lehmann


    "Michelle" <> wrote in message
    news:...
    > As stated in my last post, I already tried that, but it doesn't work. Can
    > someone pleasy type the code so I can cut and paste it, as I have spent an
    > entire day working on this detail to no avail and am way behind schedule?
    >
    > Again, I have a form asking for considerable information including email
    > address with confirmation. One field is "email_address" and the other is
    > "confirm_email". I tried pasting in the code:
    >
    > "<input type="submit" onclick="if (sponsor_email.value ==
    > sponsor_confirm_email.value) { return true; } else { alert('Email

    addresses
    > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > value="Submit" >"
    >
    > That doesn't work, as it accepts both the right and wrong email addresses
    > without prompting on the error. I also tried the Password Javascript and
    > that doesn't work either. Can someone please help me with the right code

    to
    > confirm email address in forms?
    > --
    > Thanks a million. Michelle
     
    Bob Lehmann, Dec 3, 2005
    #6
  7. Guest

    Bob Lehmann Guest

    Sorry, there's a typo....
    I left sponsor_confirm_email in one place. Change it to confirm_email.

    <form method=post action="" onsubmit="if (this.email_address.value ==
    this.confirm_email.value) { return true; } else { alert('Email addresses do
    not match!'); this.confirm_email.focus(); return false; }">

    Bob Lehmann

    "Bob Lehmann" <> wrote in message
    news:...
    > It would be very helpful if you put your page up on the Web, so someone
    > could look at the whole picture. And a more complete description of

    "doesn't
    > work" would also be helpful.
    >
    > Anyway, I don't think you can cancel a form submit from the onclick of a
    > submit button.
    >
    > So, 2 things....
    > 1. Move the script to the onsubmit event of the form tag.
    >
    > 2. Make sure the script part is all on one line. You can get some

    funkiness
    > sometimes in scripts with linebreaks if you're not careful.
    >
    > You will, of course have to supply the correct action. And, if you're

    using
    > FP automagical validation, this won't work without tweakage - See my first
    > remark.
    > <form method=post action="" onsubmit="if (this.email_address.value ==
    > this.confirm_email.value) { return true; } else { alert('Email addresses

    do
    > not match!'); this.sponsor_confirm_email.focus(); return false; }">
    >
    > Bob Lehmann
    >
    >
    > "Michelle" <> wrote in message
    > news:...
    > > As stated in my last post, I already tried that, but it doesn't work.

    Can
    > > someone pleasy type the code so I can cut and paste it, as I have spent

    an
    > > entire day working on this detail to no avail and am way behind

    schedule?
    > >
    > > Again, I have a form asking for considerable information including email
    > > address with confirmation. One field is "email_address" and the other

    is
    > > "confirm_email". I tried pasting in the code:
    > >
    > > "<input type="submit" onclick="if (sponsor_email.value ==
    > > sponsor_confirm_email.value) { return true; } else { alert('Email

    > addresses
    > > do not match!'); sponsor_confirm_email.focus(); return false; } "
    > > value="Submit" >"
    > >
    > > That doesn't work, as it accepts both the right and wrong email

    addresses
    > > without prompting on the error. I also tried the Password Javascript

    and
    > > that doesn't work either. Can someone please help me with the right

    code
    > to
    > > confirm email address in forms?
    > > --
    > > Thanks a million. Michelle

    >
    >
     
    Bob Lehmann, Dec 3, 2005
    #7
  8. PS
    and if you are using any other FP form validation the script will be removed when you save the page

    --

    _____________________________________________
    SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
    "Warning - Using the F1 Key will not break anything!" (-;
    To find the best Newsgroup for FrontPage support see:
    http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
    _____________________________________________


    "Bob Lehmann" <> wrote in message news:...
    | It would be very helpful if you put your page up on the Web, so someone
    | could look at the whole picture. And a more complete description of "doesn't
    | work" would also be helpful.
    |
    | Anyway, I don't think you can cancel a form submit from the onclick of a
    | submit button.
    |
    | So, 2 things....
    | 1. Move the script to the onsubmit event of the form tag.
    |
    | 2. Make sure the script part is all on one line. You can get some funkiness
    | sometimes in scripts with linebreaks if you're not careful.
    |
    | You will, of course have to supply the correct action. And, if you're using
    | FP automagical validation, this won't work without tweakage - See my first
    | remark.
    | <form method=post action="" onsubmit="if (this.email_address.value ==
    | this.confirm_email.value) { return true; } else { alert('Email addresses do
    | not match!'); this.sponsor_confirm_email.focus(); return false; }">
    |
    | Bob Lehmann
    |
    |
    | "Michelle" <> wrote in message
    | news:...
    | > As stated in my last post, I already tried that, but it doesn't work. Can
    | > someone pleasy type the code so I can cut and paste it, as I have spent an
    | > entire day working on this detail to no avail and am way behind schedule?
    | >
    | > Again, I have a form asking for considerable information including email
    | > address with confirmation. One field is "email_address" and the other is
    | > "confirm_email". I tried pasting in the code:
    | >
    | > "<input type="submit" onclick="if (sponsor_email.value ==
    | > sponsor_confirm_email.value) { return true; } else { alert('Email
    | addresses
    | > do not match!'); sponsor_confirm_email.focus(); return false; } "
    | > value="Submit" >"
    | >
    | > That doesn't work, as it accepts both the right and wrong email addresses
    | > without prompting on the error. I also tried the Password Javascript and
    | > that doesn't work either. Can someone please help me with the right code
    | to
    | > confirm email address in forms?
    | > --
    | > Thanks a million. Michelle
    |
    |
     
    Stefan B Rusynko, Dec 3, 2005
    #8
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Fitzpatrick

    Re: Confirm your email address on a form

    Mark Fitzpatrick, Sep 3, 2003, in forum: Microsoft Frontpage
    Replies:
    1
    Views:
    284
    Bernie Deitrick
    Sep 3, 2003
  2. Guest

    Confirm Email Address in Form (URGENT)

    Guest, Dec 2, 2005, in forum: Microsoft Frontpage
    Replies:
    4
    Views:
    1,435
    Andrew Murray
    Dec 2, 2005
  3. Guest

    Confirm Email Address in Form (URGENT)

    Guest, Dec 2, 2005, in forum: Microsoft Frontpage
    Replies:
    3
    Views:
    276
    Andrew Murray
    Dec 2, 2005
  4. Guest
    Replies:
    2
    Views:
    263
    Andrew Murray
    Apr 16, 2006
  5. Stan Hilliard

    FP2003 Form Wizard - form saves to file but no confirm page.

    Stan Hilliard, Nov 16, 2007, in forum: Microsoft Frontpage
    Replies:
    9
    Views:
    343
    Stan Hilliard
    Nov 21, 2007
Loading...

Share This Page