Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascading javascript parents/popups?

Status
Not open for further replies.

Buffcode18

Programmer
Aug 21, 2006
4
US
Hi,

Here's my situation. I have a web page which opens up a flash audio player in a popup using window.open. From the audio player, I have a button which opens another popup. What I want to do is put a link in this popup to close it and load another page back in the original web page.

Obviously if I target the parent from this popup, it targets the second popup with the audio player in it. Is there any way to target the original window?

Thanks!
 
I guess the next step is, what if the original window has been closed? I came up with this-

function Redirect(url){
if (window.opener.opener.closed) {
window.open.location = url;
} else {
window.opener.opener.location = url;
}
self.close();
}

But if I close the top parent, nothing happens?
 
Replaced that with window.open, is that right? Still nothing happening
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top