Reputation: 683
I have a condition by which I need to refresh the parent window after closing the child window.
For example:
Suppose A.aspx is the page from which I am opening a popup (B.aspx). When I close B.aspx page it should reload my A.aspx.
Note: I am using window.open()
Upvotes: 2
Views: 575
Reputation: 1154
You can control main window in your popup by using window.opener
window.addEventListener('beforeunload', function(eventObject) {
window.opener.location.reload();
});
Upvotes: 2