Chris Conway Chris Conway - 1 year ago 100
Javascript Question

Popup detection before user logs in

Is there a good way to determine if a person has a popup blocker enabled? I need to maintain a web application that unfortunately has tons of popups throughout it and I need to check if the user has popup blockers enabled.

The only way I've found to do this is to open a window from javascript, check to see if it's open to determine if a blocker is enabled and then close it right away.

This is slightly annoying since users who do not have it enabled see a small flash on the screen as the window opens and closes right away.

Are there any other non-obtrusive methods for accomplishing this?

Answer Source

Read Detect a popup blocker using Javascript:

Basically you check if the '' method returns a handler to a newly opened window.

Looks like this:

<script type="text/JavaScript" language="JavaScript">
 var mine ='','','width=1,height=1,left=0,top=0,scrollbars=no');
    var popUpsBlocked = false
    var popUpsBlocked = true
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download