Computing.Net > Forums > Web Development > Reload other page from popup window

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Reload other page from popup window

Reply to Message Icon

Name: kumschick
Date: May 9, 2005 at 14:50:41 Pacific
OS: Windows XP Media Center 2
CPU/Ram: 3,06GHz / 1GB DDR
Comment:

hi,

how do i refresh a window from a popup window? the main window is a framed window.

I want to reload the frame='mrm_main' from the popup window when closing by using:

close window




Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: May 10, 2005 at 01:05:16 Pacific
Reply:

If the frame you want to refresh is the same one that initiated the popup, then you can use this:

window.opener.document.location.href="PageToRefres.htm";

You can change (or refresh) the parent window using this:

window.opener.parent.document.location.href="PageToRefres.htm";

And, you can target a specific frame in the parent document like this:

window.opener.parent.frameName.location.href="PageToRefres.htm";

Note, in the JS object model, frames are also included in an array starting at 0 from the top left to the bottom right. So instead of the frame name, you could also use frames[n]

In all these examples, I am assuming that you know the name of the HTML file that is already loaded into the frame and you can just "reload" it using the location.href. If you do not know the document already loaded into the page/frame, there might be a way to do a reload of the current document, but it escapes me right now. In any event, the above examples show how you can target specific parts of the parent document.

Michael J


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Reload other page from popup window

Re: Reload other page from popup www.computing.net/answers/webdevel/re-reload-other-page-from-popup/4025.html

How to redirect on new page from closing popu www.computing.net/answers/webdevel/how-to-redirect-on-new-page-from-closing-popu/4210.html

Links to Other Pages www.computing.net/answers/webdevel/links-to-other-pages/1554.html