
Advanced JavaScript Question - IE - Permission denied Error
Actually, the answer was posted on this group and it helped me out a lot.
Here it is again:
try
{
var strURL;
strURL = window.opener.location.href;
return true;
Quote:
}
catch (errorCaught)
{
// exception handling code.
alert('The parent browser window has navigated away from the parent
window. The submission will not be done. This pop-up window will now
close.');
window.close();
Quote:
}
-- Bert Szoghy
INSI Strategic Technologies
Ottawa
Quote:
> In window A's onunload event (assuming window B is still open and valid),
reset window B's opener
Quote:
> property to null. Window B should then always test it's window.opener
property for != null before
Quote:
> attempting to access window.opener.location.href.
> --
> Michael Harris
> Microsoft.MVP.Scripting
> --
> Please do not email questions - post them to the newsgroup instead.
> --
> consider this situation
> Window A opens a new Window B.
> B can access window A's href by window.opener.location.href
> However if you change the page ( go to some other page in window A),
> then calling window.opener.location.href from window B will have
"permission
> denied error".
> Is there anyway we can check that the window A's location has changed ?
> thanks in advance,
> kaushik