Page 1 of 1

Javascript Question. Check if Window exists.

Posted: Tue Oct 07, 2008 4:03 am
by mad_phpq
Hi, is there anyway for me to check to see if a window exists? I want to run something if a window named 'main' has been created.

Thanks

Re: Javascript Question. Check if Window exists.

Posted: Tue Oct 07, 2008 4:02 pm
by pickle
When a window is created, it can be assigned to a variable I believe - you can check if that variable exists. Other than that there may be some DOM magic you can do to see if the current window has a child window.

Re: Javascript Question. Check if Window exists.

Posted: Wed Oct 08, 2008 4:28 am
by mad_phpq
pickle wrote:When a window is created, it can be assigned to a variable I believe - you can check if that variable exists. Other than that there may be some DOM magic you can do to see if the current window has a child window.
If any DOM magicians could tell me how to do that i would be very grateful.