open windows?

Results 1 to 2 of 2

Thread: open windows?

  1. #1
    Join Date
    Dec 1969

    Default open windows?

    Could someone tell me (or point me in the right direction) how to determine if a certain window is open?<BR><BR>Let&#039s say that I have a browser window open and when the user clicks a button, another smaller window opens. I don&#039t want them to ignore this window (but I also can&#039t seem to get it to be modal) so I want to determine if the small window is still open when the focus is on the original browser window.<BR><BR>So like... they are in the application and they click the button and it opens a small window... then they go back to the application but the small window is still open... I want a little message to say "Please close the small window"... any ideas?!<BR><BR>Thanks!<BR>Kelly

  2. #2
    DBorland Guest

    Default RE: open windows?

    Kelly,<BR><BR>What I did was create a javascript variable before &#060;html&#062; in the parent called openwindow. Then I opened the child window I set openwindow = open(&#039test.html&#039,&#039test&#039). Then in the parent window I set the onfocus event so it checked if openwindow &#060;&#062;0 (openwindow is set to 0 at beginning or whenever the child window is closed). If it wasn&#039t equal to 0, the child window was open so I did an openwindow.focus(). In the child window, on the onunload event I set the parent.opener.openwindow = 0. It&#039s sort of a backhand way of making it modal. You probably will need to have the onfocus (or onclick) event on multiple items on the parent set to really force users to close the child window first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts