Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Question Unanswered: closing browsers

    OK heres the deal, I got 2 browsers which are open at the same time. I need to be able to close 1 of the browsers by clicking a button/image and then redirecting the other browser to another page. Please help me!!! Thanks in advance

  2. #2
    Join Date
    Nov 2002
    Houston, Texas

    Javascript is the answer...

    The Javascript needed to close a browser window is:


    The main thing you need to do is name your windows/browsers so you take control of them.

    I suggest these links:

    By the way, this is a relatively easy task, but there are a few factors that could confuse things. Did one browser open the other browser? This could cause a problem with security and the user will most likely be prompted with a dialog box that asks them if they're sure they want to close the window.

    Let me illustrate:

    The User opens Browser 1.
    The User clicks on something and Browser 2 opens (or it could open automatically).
    Browser 2 is now the "child" of Browser 1.
    If Browser 2 tries to close Browser 1, Windows will ask the User "Are you Sure?"

    There is a workaround for this (I've read it somewhere in this forum), but I urge you not to use it. It's sneaky coding and most people don't like have someone close their browser without asking. Imagine the abuse this could be put to. You come to my page, behind the scenes I make it your new homepage, and now every time you go to another search engine, I close that page. I could make sure you never got to Yahoo again!

Posting Permissions

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