How to refresh the parent window from a pop up window.
Last updated: 06/26/2009
Sometimes you want to refresh the parent / main window from a popup window. For instance, if the popup window causes some data to change, which affects the information on the parent page.
Within the popup, after making the change, you can embed the following javascript:
<script type="text/javascript"> var URL = unescape(window.opener.location.pathname); window.opener.location.href = URL; </script>
This causes the parent window to reload - it won't maintain page position, but will get the job done otherwise. You could append the page anchor to the above code, if you know it precisely.
If you want to do this when closing the window, just add it to the code for the "onClick" of the button.