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

Re: How to know that a window is still open

Thank you very much for valuable replies to my question, or questions.
After receiving answers from Gordon, John Ray and Richard Bullington,
I finally learned how to recognize that a given window is a top-level
window, or not.

   The simple test if (window.name=="") really works (also on UNIX, Gordon).
   My mis-understanding was that I replaced 'name' in the line above,
   with a real window name (e.g. helpwin, setupwin etc.), but it must be
   exactly 'name' (name is a property, isn't it?).

But I did not succeed with the second problem (which seemed simpler):
How to know that a window which was opened by me is still open? I know
that an obvious solution is to remember value returned from open() and
then use it in close() method. But I do not want to remember it because:
1. There are problems how to protect stored value over reload and resize.
2. I am opening some windows from href (with target), so I do not have
   any returned value.
I think that should be a method how to ask about a window whose name is
known. Unfortunately, I do not know how to ask...

Thanks againt for your help.
Best regards,
Martin Senger

| Martin Senger     m.senger@dkfz-heidelberg.de      |
|                   voice: (0049) 6221/422340        |
|                   fax:   (0049) 6221/422333        |
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/