1 Reply Latest reply on Mar 6, 2008 9:20 AM by robdillon

    closing a browser window

    3scaper
      I'm wondering if I have a main.swf that has a button with a getURL code to load a box.swf; can I somehow close the browser window that main.swf opens in? because if I click between main.swf and box.swf a new browser keeps opening up.

      Please help.

      Thanks,
      Tri
        • 1. Re: closing a browser window
          robdillon Most Valuable Participant
          If you opened the window with javascript, then you can close it with javascript: window.close(); If you did not open the window with javascript then you cannot close it using javascript. How this works varies by browser, some browsers will just do nothing, others will show an alert window. IE will show an alert warning you that life as we know it will end if you close that window.