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/FrontPa...3/Default.aspx
_____________________________________________
"Bob Lehmann" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| 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" <(E-Mail Removed)> wrote in message
| news:128DCFE0-1FAC-4D1C-99E5-(E-Mail Removed)...
| > 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
|
|