refresh parent window when closing child window
Solution 1:
To refresh the parent page on close of child window use the following javascript in the popup page and call that using onunload in the popup page.
function refreshParent()
{
window.opener.location.reload(true);
}
<body onunload="javascript:refreshParent()">
Solution 2:
You can access the parent window using
window.opener
and refresh the parent window using
window.opener.reload()
See window.opener
Solution 3:
<body onunload="window.opener.reload();">
If you use this when you close your child window, the parent will be reloaded. window.opener refers to the parent window object.