Click to See Complete Forum and Search --> : Help Please: Opening and Closing Windows


James L.
10-03-2003, 04:39 PM
Hey all,

O.K., here is my situation. I am using a floating window on a site as a navigation "palette"... don't ask why, it's a long story.

Anyway....

The navigation palette (window) is opened from the main index page. These pages now take on the parent (index) and child (floating window) relationship.

The floating window contains many links to various pages. When each link in the floating window is clicked, it loads that page into the PARENT window. This is easy enough to do and not something I am confused about.

Here is the thing though. Each page, which resides in the parent window, has 2 buttons, Open and Close. One opens the floating navigation palette, the other closes it.

These buttons work fine on a page to page basis. The open button on page 1, for example, opens the floating window. The close button on page 1 closes the floating window. All of the navigation links within the floating window work fine to update the page in the parent window.

What I need though, is to have it so that the floating window can be opened by page 1 (currently in the parent window), then later, closed from any other page that resides in the parent window (such as page 7).

Is this possible? I mean, it should be as the function calls are window.open and window.close. I read this to mean that the document that is currently present within the parent window shouldn't have a bearing on the parent / child relationship.

I hope I explained that well.

Charles
10-03-2003, 04:51 PM
Originally posted by James L.
Is this possible? Not without playing games with frames.

James L.
10-03-2003, 06:22 PM
Yeah, that is sort of what I thought Charles.

I guess where I was going with it (as far as my flawed logic goes), was that a relationship is established between the parent window (opener) and the child window when it is opened. i guess I was thinking that the relationship would stay the same regardless of what document was in the parent.

But, now that I think about it, the new window is a variable of the document that opened it, i.e.:

newWin = window.open(blah blah...)

so, as soon as you change this document, that variable is toast... is that right?

p.s. I hate frames! :)