[thelist] Two windows; child window reloads the parent.

Kowalkowski, Lee (ASPIRE) lee.kowalkowski at hmrcaspire.com
Mon Oct 10 02:37:02 CDT 2005


> -----Original Message-----
> From: Alex Beston [mailto:alex at deltatraffic.co.uk]
> Sent: Monday, October 10, 2005 7:58 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] Two windows; child window reloads the parent. 
> 
> There is a main window with a link to a little window which displays 
> program execution output, updates the main window, closes itself  and 
> focus is then returned to the main window. 
> 
> Currently i can open the little window, run data, make it 
> close itself 
> and so return to the main window, but i cant refresh the main window 
> before the little one closes. so the data that is run pertains to the 
> main window and i dont want the user to have to press the 
> refresh button.
> 
> do i have to give the main window a name and then refresh that named 
> window? how is refreshing done in js?
> 
> something like window.name.refresh? nothing like that in the api tho'
> 

You need opener.location.reload(), however there's a chance you could get
"Access is denied" if you're main and little windows are in different
domains.

You should be able to add a function to your main window, if this is the
case:

  function update()
  {
    location.reload();
  }

and in your little window:

  opener.update()

-LK


===========================================================
Our e-mail domain has now changed from iraspire.com to hmrcaspire.com. Please update your address books.
===========================================================



More information about the thelist mailing list