Reputation: 381
I use the below JS to refresh Parent page, but I am getting the below message
Code:
window.opener.document.location.reload();
window.close();
Please help me how to avoid this
Upvotes: 1
Views: 349
Reputation: 25672
You can avoid using POST
before refresh is required or set the location property instead of using reload
:
window.opener.document.location = window.opener.document.location;
One more option is to redirect the parent page directly after the post
request is done. After that the child can refresh the page without the popup.
Upvotes: 1