close all windows from one place

Hello.
How can I close all the windows that were open in the application ?
I have a "Log Out" button and I have a window that was open (popup) somewhere in the application. How can I close it ?
Is there some array of the windows names that I can run on and close them all ?

thanks.

Comments

  • var popoups = new Array();

    Then, instead of just window.opening a popup, do

    popups.push(window.open(etc));

    And to close them all

    for (i = 0; i < popups.length; i++)
    popups[i].close;

    (Lillu posted this trick a while back, I just stole it)
  • : var popoups = new Array();
    :
    : Then, instead of just window.opening a popup, do
    :
    : popups.push(window.open(etc));
    :
    : And to close them all
    :
    : for (i = 0; i < popups.length; i++)
    : popups[i].close;
    :
    : (Lillu posted this trick a while back, I just stole it)
    :


    Thanks for the replay.
    Not all the popups are open from the same frame.
    Is the popups array is global var ???
  • I think it will, if you define the array in the frameset page, but I'm not very good at cross-frame scripting. It probably differs from browser to browser, as well.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories