I am trying to use the following JavaScript to check if a popup page is still open.
The parent page (calling page to open popup) is open but this code continues to fail. I am calling it from an aspx popup page that has a masterpage inside another masterpage. So the click event that eventually calls this script is an Edit Link in a Gridview in a content Placeholder which is in the upper most master page content Placeholder, not sure if that has anything to do with it. The script fires but it does not see the parent page as open and not closed.
if (window.opener != null && !window.opener.closed) {
alert(window.opener);
var val = window.opener.parentFunc(a);
alert(a);
}
This is an IE only problem, Firefox can identify the window.opener
page. Tried multiple versions of IE all had issues, Firefox and Opera work though.
I actually used this alert statement....
alert(window.opener);
In IE returns Undefined.
In Firefox returned ObjectWindow.