Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Js: refresh main window from child window


txbakers - 4:26 pm on Nov 19, 2002 (gmt 0)


Yes, this is easy. You can use this little bit of code:

opener.location.reload();

This will force the parent window to refresh. Usually I follow that code with this:

window.close();

So the user can click the "close" button and have the main window reload.

this works when the user clicks the "close" button, but if they just click the "X" it doesn't. You can use the onUnload="opener.location.reload()" routine in the <BODY> to catch that one.


Thread source:: http://www.webmasterworld.com/javascript/225.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com