Refresh window from other

Hi,
I have a window which is opened in the follow way:
onclick="Route=window.open('edit_routes.php','Route','location=no,toolbar=no,menubar=no,top=0,left=0,height=700,width=1000'); return false;">
From this window I open several more windows.  I need the first window to refresh when one of the child windows reloads, which is simple using the parent.refresh action.  My problem is that if a window which is NOT a child window of the first window needs to refresh it, I cant seem to make it happen.
How can I do this seeing as the first window name is 'Route'.
Thanks!
D.
LVL 1
maundedAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amit_gCommented:
From first child opener.location.reload();
From second child opener.opener.location.reload();
From third child opener.opener.opener.location.reload();

and so on.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
knightEknightCommented:
or, from anywhere you can do this:

window.open("","Route").location.reload();  // assumes the "Route" window is already open
maundedAuthor Commented:
I can see the logic behind that, but if the child window is not actually a child eg
windowA opens WIndowB
WindowC opens WindowD
WIndowsD needs to refresh WindowA
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

maundedAuthor Commented:
ACtually the second solution works well, but if the user closes the Route window, refreshing the child opens a blank window...can we do an "if window is open" type of thing...my javascript isnt very good :)
knightEknightCommented:
each solution has strengths and a weaknesses, and a weakness of the second solution is that you can't pre-check for the existance of the window (at least I don't know how to do it).  
maundedAuthor Commented:
Then is it possible to call the location.reload to the window by name?  Something like window['Route'].location.reload();
knightEknightCommented:
no, you have to get a handle to it first, and to do it by name the only way I know to do it is what I suggested above.   Maunded's solution will also work, but you would have to be explicit in terms of the number of parents (openers) you need.  Plus then you could test to see if it is open or closed like this (for example):

if ( opener.opener && !opener.opener.closed )
{
   opener.opener.location.reload();
}
maundedAuthor Commented:
Thanks folks...the first way was the best in the end for me.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.