I *THINK* this will work:
(1) Make sure that every window has a name. That is, when you create the window, make sure you give it a name:
window.open("childPage.aspx", "CHILD", "...whatever..." );
and from the child:
window.open("theBaby.aspx", "GRANDCHILD", "..." );
(2) Later, when you need to "find" that same window again (in page2 or wherever) you find it thus:
var kid = window.open( "", "CHILD" );
notice the lack of URL there.
That *should* find the window and then you can do
kid.close( );
BUT...
But I don't know if your user will get one of those annoying "an application is trying to close this window..." messages.
And the answer might vary by browser.
Let me know. I'd try it, but I need to get to sleep.
|