5

I have a html page with a button pop-up. If I click on this button a new window Pops-up, I do all of my changes in this window and then click the close button. The html page with the popup button should refresh after I closed the pop-up window. Is this possible?

3 Answers 3

10

yes.

//reload opener...
window.opener.location.reload();
//close self...
window.close();
Sign up to request clarification or add additional context in comments.

Comments

2
<body onunload="opener.location.reload(true);">

1 Comment

Only thing to note here is that this will refresh the opening window ANY time the body is unloaded (this includes refreshes).
1
<script>function reload(){document.location = document.location}</script>

3 Comments

This script would reload "this" page, not the opener... or are you suggesting to inject this in the opener when closing the popup?
sorry i wasn't paying attention didnt see he wanted to refresh opener... id use my function above on opener page and make the call from popup <body onunload="opener.reload();"> just another way to do it... that would work right?
If you have a hash in your URL it wont actually refresh the page, but just do whatever going to that hash does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.