I have searched many issue in stack overflow and might be duplicate here Detect Popup
But not helped for me
while testing in Chrome (tested v26.0.1410.64)
Following Approach Worked in IE and Firefox
but not in Chrome
var popup = window.open(winPath,winName,winFeature,true);
if (!popup || popup.closed || typeof popup.closed=='undefined'){
//Worked For IE and Firefox
alert("Popup Blocker is enabled! Please add this site to your exception list.");
window.location.href = 'warning.html';
} else {
//Popup Allowed
window.open('','_self');
window.close();
}
Any better solution that works for Chrome also?
The below code works in chrome,safari and firefox. I have used jquery for this.
Finally, it success by combining different answer from Stackoverflow's member
This code worked for me & tested in
IE, Chrome & Firefox
I found it much more effective to use try-catch as follows:
I had used this method to open windows from js and not beeing blocked by Chrome. http://en.nisi.ro/blog/development/javascript/open-new-window-window-open-seen-chrome-popup/
I know this is "resolved", but this simple code worked for me detecting "Better Popup Blocker" extension in Chrome:
Ockham's razor! Or am I missing something and it couldn't possibly be this simple?
Try Below..!!
Look on below question
Detect blocked popup in Chrome
How do I detect whether popups are blocked in chrome
On Google It will more help you..
https://www.google.com/search?q=how+to+detect+a+blocked+popup+in+chrome