Refresh parent window from child window

How can I reload the parent child of a window using jQuery?

+45
javascript jquery
Aug 23 '09 at 7:39
source share
9 answers

There is no jQuery in this situation.

window.opener.location.reload(false); 

https://developer.mozilla.org/en-US/docs/Web/API/Window

+81
Aug 23 '09 at 7:41
source share

You can use window.opener , window.parent , or window.top to refer to the window in question. From there, you simply call the reload method (for example: window.parent.location.reload() ).

However, as a warning, you may encounter problems with window.opener if you need to go from the initially open page, since the link will be lost.

+17
Aug 23 '09 at 8:39
source share
 parent.location.reload(); 

That should work.

+4
Apr 20 '17 at 8:33
source share

You can reload the location of the parent window using:

 window.opener.location.href = window.opener.location.href; 
+2
Jun 07 '13 at 5:23
source share
  top.frames.location.reload(false); 
+1
May 03 '13 at 20:57
source share

Prevents retransmission of previous data. Tested in Firefox and Safari.

 top.frames.location.href = top.frames.location.href; 
0
Sep 15 '14 at 20:20
source share
 window.parent.opener.location.reload(); 

worked for me.

0
Apr 6 '16 at 6:43
source share

This works for me:

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

In this case, the Current tab closes and the parent tab refreshes.

0
Apr 26 '17 at 8:34 on
source share

it will work

 window.location.assign(window.location.href); 
0
Aug 25 '17 at 14:08
source share



All Articles