[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Communicating between windows...

At 01:57 PM 3/6/96 EST, you wrote:
>I have a JS that opens a window, as in:
>     win = window.open(.....).
>The opened window's <body> tag includes an onUnload clause.  If the user closes
>the second window from the user interface, I want the onUnload clause to report
>back to the originating window that the second window has closed.  I cannot
>figure out a way to do that.  There does not seem to be a way for the second
>window to refer back to a method in the original window, for example to
invoke a
>function in the original window.

Hypothetical suggestion:

****first window****
newWin = window.open(...)
newWin = window.open(...)  // called twice for MAC an X bug
newWin.creator = self
var exist = true

<BODY onUnload="creator.exist=false">

Do you think that this would solve your problem??
I've done something like this using objects at the following URL:
http://www.his.com/~smithers/freq/beta/window.html (might be windows.html)

When you open the new window, the boolean is set to true.
If you try and open a new window, the boolean is checked.
When the new window is closed, it updates the 'creator' object (the original

Let me know if this helps (even if it doesn't)...
-Andy Augustine

For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/