function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sreenivas_cippyalisreenivas_cippyali 

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');
//}
}

@anilbathula@@anilbathula@
Hi

go through this ajax guide for salesforce to get solution for your problem.
http://www.salesforce.com/us/developer/docs/ajax/index.htm