petenyce105
Programmer
im trying to validate a email address. im using this function and returning me a error
<script language="javascript">
Function email()
if (ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-z0-9\-\.]+$'))
return true;
else
return false;
}
</script>
if(!email(document.registerForm.email.value)) {
alert("Phone number must include area code."
;
document.registerForm.email.focus();
return;
}
something wrong with this any help or a email script would work?
<script language="javascript">
Function email()
if (ereg('^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-z0-9\-\.]+$'))
return true;
else
return false;
}
</script>
if(!email(document.registerForm.email.value)) {
alert("Phone number must include area code."
document.registerForm.email.focus();
return;
}
something wrong with this any help or a email script would work?