I have some javascript that I use to test for valid email addresses. I have used it before with success, but on one page it won't allow numbers in email addresses. Here are the code snippets:
<script>
function val(str) {
var objRegExp =
/(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;
return objRegExp.test(str);
}
</script>
and on the email form field:
<INPUT TYPE="text" NAME="EMail" size="30%" maxlength="60"
style="font-family: arial,verdana; font-size: 11px;" onBlur="if(!val(this.value)){alert('Invalid Email, Please check
entry!')};">
Any ideas ?
<script>
function val(str) {
var objRegExp =
/(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)(\.[a-z]{3})(\.[a-z]{2})*$)/i;
return objRegExp.test(str);
}
</script>
and on the email form field:
<INPUT TYPE="text" NAME="EMail" size="30%" maxlength="60"
style="font-family: arial,verdana; font-size: 11px;" onBlur="if(!val(this.value)){alert('Invalid Email, Please check
entry!')};">
Any ideas ?