I am trying something like below,
var myWindow = null;
if(!myWindow || myWindow.closed)
{
myWindow = window.open(url, windowId);
}
else
{
myWindow.focus();
}
All browsers return the window ref for window.open(), but IE 9 returns NULL. Does anybody have more information on why null is returned or possibly a workaround solution for IE9?
window.open
returns a NULL reference object if Enable Protected Mode is checked under Internet Options->Security->Security Level for this zone and the ZONE is different i.e. in my case local file opening a popup from Intranet.
window.open
returns a reference object even if Enable Protected Mode is checked when mysite.com opens someothersite.com in popup window i.e. Internet->Internet
Out of curiosity, what's your windowId
? Does it have a space in it?
Because, apparently IE9 will fail if there's a space in the window title.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With