Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: how to reload/refresh the parent window?


Message #1 by "Tahi Hogan" <programmingcode@y...> on Fri, 7 Sep 2001 00:59:54
Tahi,

Just in the last couple of days I found the need to do the same thing.  My 
approach was a little different.... When I close the ch1ld window then the 
parent window comes back into 'focus' and I use the onFocus event in the 
body tag of the parent to reload a fresh copy

onFocus="location.reload(true)"

The 'true' specifically directs a reload from the server and not any copy 
that may have been cached.  

This works for me and reloads my <div>'s with updated data.

The behavior is a little strange because onFocus doesn't seem to fire when 
the page is load the first time so it acts more like onReFocus - but, it 
works.

Hope this helps.
Peter


> Hi guys,
> 
> I'm doing some databse manipulation on the second window, which is 
opened 
> by a javascript function in the first window(parent). When I'm done with 
> this, I'd like to close the second(child one) and reload the first one
> (parent), so I can see the changes that I made in the second(child) one.
> Any one has any idea how to do this? I already tried:(on the second 
window)
> 
> parent.reload()
> 
> but it still doesn't work for me. Any suggestion will be much 
appreciated.
> 
> Thanks
> 
> Tahi

  Return to Index