Dinakar Nethi

A .NET/SQL Server Blog

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

About Me

Links

Subscriptions

Article Categories



Refresh parent window from child window without having to press the refresh button

  • Heres a small piece of code to force refresh the parent window from the child window after closing the child window, without having to press the refresh button.

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

response.write the above JS code in the child window.

for example:

response.write(”<Script> window.opener...........close();" & Chr(60) & "/script >")

  • If you want the user to manually refresh the page after closing the child window use window.opener.location.reload();window.close(); in the above example.
  • If you just want to close the child window ( as in “cancel”) use window.close(); in the above example.

 

posted on Thursday, April 29, 2004 10:28 AM by dinakar


# re: Refresh parent window from child window without having to press the refresh button @ Monday, October 22, 2007 10:14 AM

Thanks. It worked for me..... : )

Venu

# re: Refresh parent window from child window without having to press the refresh button @ Saturday, October 27, 2007 5:40 AM

Thanks. I was struggling for so long...it worked..

cheers
Rajesh

Rajesh

# re: Refresh parent window from child window without having to press the refresh button @ Thursday, December 06, 2007 12:41 AM

top.opener.location.reload();

Rakesh

# re: Refresh parent window from child window without having to press the refresh button @ Tuesday, January 01, 2008 8:50 AM

Thanks, it worked for me :)

Abu Alam

# Refresh parent window from child window without having to press the refresh button @ Sunday, April 13, 2008 10:50 PM

Ref:http://www.dotnetjunkies.com/WebLog/dinakar/articles/12379.aspx

Anonymous

# re: Refresh parent window from child window without having to press the refresh button @ Wednesday, June 11, 2008 2:57 AM

thanks a lot it worked as per my requirement.

ravi

# re: Refresh parent window from child window without having to press the refresh button @ Tuesday, September 09, 2008 10:17 AM

Dinakar,
Really thank you man!!!

It's really good one and helpful.

Rajendra Shimpi

# re: Refresh parent window from child window without having to press the refresh button @ Tuesday, September 16, 2008 1:43 PM

Worked like a charm. Thanks

Gaurav

# re: Refresh parent window from child window without having to press the refresh button @ Friday, September 19, 2008 8:29 AM

but how to avoid page refresh

kiran

# re: Refresh parent window after closing child window @ Friday, October 03, 2008 7:58 AM

Visit <a href='http://developmentzone.blogspot.com/2008/09/refresh-parent-window-on-child-window.html'>http://developmentzone.blogspot.com/2008/09/refresh-parent-window-on-child-window.html</a>.

vishal

# re: Refresh parent window from child window without having to press the refresh button @ Saturday, November 08, 2008 5:12 AM

thanks a lot it worked without any problem :)

manisha p

# re: Refresh parent window from child window without having to press the refresh button @ Saturday, November 08, 2008 5:13 AM

you saved my time

manishap




Powered by Dot Net Junkies, by Telligent Systems