code-tutorial.com

The best resources for developers

How do I know if my browser is blocking popups?

var newWin = window.open(url);             

if(!newWin || newWin.closed || typeof newWin.closed=="undefined") 
{ 
    //POPUP BLOCKED
}

Tags: popup

Source: By Nathan Bedford as answer to the question

This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0


Related code-snippets: