views:

389

answers:

2

Occasionally, I've come across a webpage that tries to pop open a new window (for user input, or something important), but the popup blocker prevents this from happening.

What methods can the calling window use to make sure the new window launched properly?

+13  A: 

If you use javascript to open the popup you can use something like this.

var newWin = window.open(url);

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

Omar Ramos
A: 

Thanks Omar! I'll give it a try.

Nathan Bedford