zaitsman
zaitsman

Reputation: 9499

Close popups created with window.open in IE11

I have Ie 11 to support. I open the popup using var myWindow = window.open('url','name','width=640,height=480,menubar=no,toolbar=no');

however, the handle returned (myWindow) is always null in ie.

I need to close that popup after certain events happen. I know that it is possible because I've seen other sites do that in the same browser.

Any ideas?

Upvotes: 0

Views: 1444

Answers (1)

AstroCB
AstroCB

Reputation: 12367

If window.open() is returning null, then something is wrong. You're likely blocking popups, which means that the Window object will not be created (and thus myWindow will be null).

Check your security settings there and enable them.

Once you get window.open() to execute successfully, you can call myWindow.close() to close the popup when necessary. Note that the close() method can only close popups that have been opened using the window.open() method.

Upvotes: 1

Related Questions