Forum Moderators: open
I need to set it up to verify the email address is the same in two different fields on a regular HTML form mail.
For example, there is email field one, then email field two. They should enter the same email in both to verify they have typed it correctly.
Is there a fairly simple command for this?
Thanks!
[edited by: theadvocate at 1:32 pm (utc) on Feb. 10, 2004]
The following is what I use for making sure they fill out the email field. I know it may be a bit more involved to verify they put the same email into two fields twice, but the example you sent is about a page's worth of script.
<script language=javascript>
<!--
function openwindow(test) {
window.open(test, 'test', 'toolbar=no,scrollbars=2,location=no,status=no,menubar=no,resizable');
}
function validate(form)
{
//Data validation using object names to reference objects
if (form.contactname.value == "")
{
alert("You must enter your name!");
form.contactname.focus()
return false;
}
if (form.contact2.value == "")
{
alert("You must enter your email!");
form.contact2.focus()
return false;
}
}
// -->
</script>