views:

1060

answers:

2

How can i reaload my parent window from child window using jquery?

Please help.

+5  A: 

No jQuery is necessary in this situation.

window.opener.location.reload(false);

http://www.w3schools.com/HTMLDOM/dom_obj_location.asp

ChaosPandion
Yep, just fixed that. Thanks for the explanation.
ChaosPandion
It does take an argument - you can pass in true to force reload (i.e. ignore cache)
Greg
The Mozilla reference site mentions this. I wonder if it is browser specific.
ChaosPandion
It's on MSDN too
Greg
Even if the argument is non-standard, it will be ignored (http://www.w3.org/TR/Window/#location-methods), so there's no harm in using it unless you want the default behaviour.
strager
A: 

You can use window.opener, window.parent, or window.top to reference the window in question. From there, you just call the reload method (e.g.: window.parent.location.reload()).

However, as a caveat, you might have problems with window.opener if you need to navigate away from the originally opened page since the reference will be lost.

Justin Johnson