Rnga Rnga - 2 months ago 16
Javascript Question

Javascript refreshing parent page pop up message

I am using JavaScript for closing a pop up and refreshing the parent page. When I click on "close" button in the pop up, a new pop up message from internet explorer is showing up. How can we overcome this by not showing the pop up message by internet explorer.

I am not bale to upload the image But this is the message in the pop up:
"To display the webpage again, the web browser needs to resend the information you've previously submitted.

If you are making a purchase you should click cancel to avoid the duplicate transaction. Otherwise click retry to display the web page again".

Please find the code i have used below:

window.onunload = refreshParent;
function refreshParent() {
window.opener.location.reload();
window.close();
}

Answer

Chage your refresh function

window.onunload = refreshParent;
function refreshParent() {
    window.opener.location = window.opener.location.href
    window.close();
}
Comments