You need to sign in to do that
Don't have an account?

in script alerts are not firing
calling this function on button click . if i remove all the logic from the function then alerts are firing ..
function verifyemail()
{
alert('hi');
String emailRegex = '([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})';
Pattern MyPattern = Pattern.compile(emailRegex);
Matcher MyMatcher = MyPattern.matcher(email.value);
alert('bye');
// if (!MyMatcher.matches()) {
// alert('it is not in email format enter correct email address');
//}
}
go through this ajax guide for salesforce to get solution for your problem.
http://www.salesforce.com/us/developer/docs/ajax/index.htm