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

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()
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);
// 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.