window.opener becoming null after 10 seconds

Wondering if anyone else has ran into this problem...

function refreshMe()
{
var openerObj = window.opener;
window.close();
alert(openerObj);
openerObj.opener.location.href = openerObj.opener.location.href;
}

openerObj has a value of [object DOMWindow] when a new window pops up. But when I wait approximately 10 seconds the value is becomes null.

Any suggestions or advice you may have is appreciated.

Macbook, Mac OS X (10.5.8), Safari 4.0.3 (5531.9)

Posted on Sep 23, 2009 8:10 PM

Reply
3 replies

Sep 23, 2009 8:26 PM in response to Barry Hemphill

Basically I'm using Javascript to pop up a window (child). That window changes to another URL (sub child) after a user selection... Once that pop up form submission is complete I want to refresh the original parent window and close the sub child.

To accomplish this I'm using window.opener.opener.location.href (the original URL) which should be saved by Safari. The problem is after approx. 10 seconds the window.opener variable becomes null. I'm guessing this is something related to Sarfari and not my code...

However, I'm open to any suggestions. Thank you.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

window.opener becoming null after 10 seconds

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.