Elitmiar
Elitmiar

Reputation: 36879

Javascript refresh page

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?

Upvotes: 5

Views: 6829

Answers (3)

Carter Cole
Carter Cole

Reputation: 924

<script>function reload(){document.location = document.location}</script>

Upvotes: 1

Trevor
Trevor

Reputation: 6689

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

Upvotes: 2

scunliffe
scunliffe

Reputation: 63676

yes.

//reload opener...
window.opener.location.reload();
//close self...
window.close();

Upvotes: 10

Related Questions