Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript confirm not working in Chrome

Below is a code snippet used in the legacy application I am currently working on.

var x=confirm("Some Text");
if(x)
 //Call method A
else 
// Call method B

It was working fine till some days ago, but now it is not working in Chrome, but still good in IE.

Would it be something to do with the browser update?

like image 790
anair Avatar asked Dec 03 '15 10:12

anair


1 Answers

Remove any ad blocker extension installed to your chrome and try again. Sometimes on applications which have large user base, a few users may mark pop up as ads. This will in turn block pop up/Confirm/Dialogue/Alert for all users who have that extension installed.

I had this problem once. Ad Block extension blacklisted alerts in my website.

NOTE: After removing extension, please close all instance of chrome. Requires a complete restart of chrome

like image 57
Aneesh Mohan Avatar answered Sep 18 '22 10:09

Aneesh Mohan