Search code examples
javascriptinternet-explorer-6popuppopup-blocker

How can you open 2 windows even when ie6 popup blocker is enabled


It seems like when trying to open 2 windows from a succession of windows.open calls, it only allows the first window to open and deletes the reference to the second window. I know this probably sounds a little kludgy, but we do need to have that second popup.

Any ideas?

Unfortunately we are addressing a user-case, where ie6 on the user end has popup blocker enabled.


Solution

  • EDIT: I just realized that you probably are using a blank ('') window name for both windows:

    var win = window.open(url, '', 'blah=1');
    var win2 = window.open(url2, '', 'stuff=1'); //later
    

    This is probably handled with different windows in browsers other than IE6.

    If that does not work, you might consider injecting divs that display on top of your content (instead of using popups), which is considered a better practice.