Browser Close

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ho0c1355@hal.humberc.on.ca

    Browser Close

    Hi,
    I was wondering anyone can help me? I am looking for a javascript
    that can do such a thing? If the Mouse and keyboard sit and do nothing
    for 5 to 10 minutes. The Internet Browser will close and return to the
    PC desktop.

    Thanks,
    Chris
  • Ang Talunin

    #2
    Re: Browser Close

    You can only close a window that you've created yourself.
    On other windows, at least MIE will ask permission to close the window


    <ho0c1355@hal.h umberc.on.ca> schreef in bericht
    news:8bbd7874.0 310221058.79040 a5b@posting.goo gle.com...[color=blue]
    > Hi,
    > I was wondering anyone can help me? I am looking for a javascript
    > that can do such a thing? If the Mouse and keyboard sit and do nothing
    > for 5 to 10 minutes. The Internet Browser will close and return to the
    > PC desktop.
    >
    > Thanks,
    > Chris[/color]


    Comment

    • HikksNotAtHome

      #3
      Re: Browser Close

      In article <1066851052.852 817@halkan.kabe lfoon.nl>, "Ang Talunin"
      <please.no.spam @no-reply.com> writes:
      [color=blue]
      >You can only close a window that you've created yourself.
      >On other windows, at least MIE will ask permission to close the window[/color]

      While it is best not to, you can in fact close a window that you didn't open
      yourself. Its exploiting a bug dating back to NN4.xx and IE5.0 (not sure about
      IE4), but it can be done.

      <script type="text/javascript">
      window.opener = window;
      window.close();
      </script>

      The only modern browser on a PC that I am aware of (there are undoubtedly
      others) that will stop it is Mozilla. NS4/6/7 Opera 7, And MSIE all allow it to
      close. The tabbed browsers close the active tab, not the browser itself though.

      But being able to close a window that you didn't open via script won't solve
      the OP's problem.
      --
      Randy

      Comment

      Working...