javascript - Reload parent page after closing popup window -


I'm trying to sign in with a popup window. When they click on a link to the popup window that is a PHP variable, they can sign in. When the window closes, I want to reload the page that was originally (on the original page).

Code on Signin.php page ... Body onunload = "opener.location = ('')" & gt;

But it does all that page was created on the user who created the sign in page. I think I should put some brackets in, but I did not know what goes there.

To reload a page, you can set the property of the property as the current value Such as:

  window.location = window.location;   

So for your case, you will literally use:

  onunload = "window.opener.location = window.opener.location;"   

You can also use the location object's reload method:

  onunload = " 

  • window.location
  • window.opener On MDN -

Comments