Aug
11
2011

JavaScript Close Window AND Refresh Parent

Earlier today I was working with complex PHP function to update values in a database, within a popout window.  The function worked flawlessly (naturally đŸ˜‰ ), however I was looking for a way to have immediate display feedback on the parent page.

Enter the JavaScript close window refresh parent script…

<a id="actions" href="#" onClick="window.close();window.opener.location.reload();">Close Window</a>

Looking for more?  Sorry!  That’s it for this crafty little function.

Leave a comment