Posted: February 11, 2012 in Random Posts

Java Tutorials

function validateEmail(obj)
{
var fld=0;
var goodEmail = obj.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);

fld = obj;

if (goodEmail)
{
good = true
}
else
{
alert(“Please enter a valid email address.”)
setTimeout(“fld.focus();”,1);
setTimeout(“fld.select();”,1);
good = false
}
return good;
}

The above

View original post

Advertisements
Comments
  1. Kylee Kase says:

    Wohh precisely what I was looking for, regards for posting.

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s