Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


reloading parent window with iframe from popup from iframe



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
idontknow



Joined: 05 Jun 2006
Posts: 1

PostPosted: Mon Jun 05, 2006 5:27 am    Post subject: reloading parent window with iframe from popup from iframe Reply with quote

Hi all,

I'm having a time here with some reloading parent window madness.

I have a site that has an iframe, and on this iframe you can click links that open new windows. In these new windows there are links to other pages within the site. When the popup is closed i'd like to reload the entire site including the iframe. I have one function that does the reload
Code:
opener.parent.location.reload(true);


and this is in a function called refreshParent. i call this in the body of the popup by adding an unload event unload="refreshParent();

Now, this works well, but my problem is, if i click one of the links in the popup my functions to open the links close the pop which causes an unload, so instead of loading the expected page from the link, the site just reloads because the unload even calls refreshParent().

I'd like to have the expected page open when a link is click, and if the popup is Xed, or closed have the parent reload. I don't know how to get around this.

Extra info: the iframes and the parent are on the same domain (somedomain.com), however the parent is on myhost.somedomain.com

refreshParent()
Code:

function refreshParent(){
    if (window.opener!=null)
       {
       opener.parent.location.reload(true);
       }
   self.close();

}


rdOpener() - this is the function used to open the links from the popup
Code:

function rdOpener(rd_url){
document.domain = "somedomain.com";
if (top!=self.parent){
top.location=self.parent.location;
}
opener.parent.location=rd_url;
window.close();
}


any ideas
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap