Refresh page by popup?

So, I used javascript to open the popup in asp.net with C # codebehind, and I need the buttonclick event in the popup to close the popup and refresh the parent page. Is there any way to do this?

+3
source share
2 answers

To change the location / update the parent window, you can use the openener property.

This option will change the parent href from the popup.

window.opener.location.href = the_url;

The method reloadwill also work, It does a hard reload (returns the default form) An optional logical conditional argument will be if true makes a new server request, if false, it will try to pull the page out of the cache.

window.opener.location.reload(true);

( ), .

window.opener.history.go(0); 

'0' , , .

+5

window.location.href=window.location.href
0

All Articles