Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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:

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

![]() |
![]() |
![]() |

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