Try the following
Change field1 to: email_address
and field2 to: confirm_email
You do understand that doing doesn't indicate that the user has entered a valid email address.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
"Michelle" <(E-Mail Removed)> wrote in message
news:4BB7A4C6-FA4F-4315-AB20-(E-Mail Removed)...
>I posted a message earlier that read "I want people to re-type their email
> address to confirm their email address in a form I have. However, if they
> accidentally type a different address in, they are not prompted of the error
> on "submit". How do I validate or set the field properties to require the
> same address in the field as in the original email field on "submit"?
>
> The response I got was "You compare the two fields.
>
> <input type="submit" onclick="if (this.field1.value == this.field2.value) {
> return true; } else { alert('Email addresses do not
> match!'); this.field1.focus(); return false; } " value="Submit" >
>
> I tried pasting the code in but it isn't working for me.
>
> My one field is "email_address" and the other field is "confirm_email".
>
> What changes do I need to make to the above code to get it to work?
>
> I tried "<input type="submit" onclick="if (this.email_address.value ==
> this.confirm_email.value) { return true; } else { alert('Email addresses do
> not
> match!'); this.field1.focus(); return false; } " value="Submit" >, but it
> didn't work.
>
> I am doing a fund raiser tomorrow for charity and really need to get this
> done as soon as possible. Please help!!!
>
>