Code:
var email = $("input#email").val();
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter(email)) {
$("label#email_error").show();
$("input#email").focus();
return false;
}
I suppose you just forgot to include the closing bracket in your example code. It's probably in your other code....
Anyways, I'm not sure about this, but filter is not a function (don't know if it is, pretty sure it isn't), just RegEx stuff. I'm not exactly sure what should happen (it should filter, but how?), but it should work in IE if it works in all other browsers... Weird.
Bookmarks