close browser window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • olga p.

    close browser window

    Hi,

    I would like to close the browser window when I open the new one. Now I'm
    getting really irritation message: do I really want to close it, yes or no.
    I just want to close the browser without the message.

    Does anybody know the solution?

    greatings,

    Olga


  • Harag

    #2
    Re: close browser window

    On Fri, 16 Jan 2004 13:13:25 +0100, "olga p." <olga.p2000@wan adoo.nl>
    wrote:
    [color=blue]
    >Hi,
    >
    >I would like to close the browser window when I open the new one. Now I'm
    >getting really irritation message: do I really want to close it, yes or no.
    >I just want to close the browser without the message.
    >
    >Does anybody know the solution?[/color]

    The only windows you can close via scripting are the windows that the
    scripting opens.

    you cannot close the original window that the user opens with a
    shortcut... (well you can but the user has the choice as you can see).


    HTH
    Al

    Comment

    • Randy Webb

      #3
      Re: close browser window

      Harag wrote:
      [color=blue]
      > On Fri, 16 Jan 2004 13:13:25 +0100, "olga p." <olga.p2000@wan adoo.nl>
      > wrote:
      >
      >[color=green]
      >>Hi,
      >>
      >>I would like to close the browser window when I open the new one. Now I'm
      >>getting really irritation message: do I really want to close it, yes or no.
      >>I just want to close the browser without the message.
      >>
      >>Does anybody know the solution?[/color]
      >
      >
      > The only windows you can close via scripting are the windows that the
      > scripting opens.
      >
      > you cannot close the original window that the user opens with a
      > shortcut... (well you can but the user has the choice as you can see).[/color]

      I think, for the sake of doing it, I will keep my mouth (and fingers)
      shut this time, its been beaten to death.

      Needless to say, you *can* [1] close that window without a prompt.
      Search the archives.

      [1] In about 80% (??) of circumstances.

      P.S. The Unconditional Truth might surprise you.


      --
      Randy

      Comment

      • DJ WIce

        #4
        Re: close browser window

        : The only windows you can close via scripting are the windows that the
        : scripting opens.
        :
        : you cannot close the original window that the user opens with a
        : shortcut... (well you can but the user has the choice as you can see).
        In the past you could:

        - open a child
        - let the child replace the current location of the parent, not via parent..
        but via the name you gave the parent.
        - then try to close the parent via that name.

        I may hope this bug is fixed by now for all browsers.
        The browser (MSIE) just though the child became parent of it's parent.

        Wouter


        Comment

        • Richard Cornford

          #5
          Re: close browser window

          "DJ WIce" <contextmenu@dj wice.com> wrote in message
          news:bu8n36$8js $1@news.tudelft .nl...
          <snip>[color=blue]
          >- open a child
          >- let the child replace the current location of the parent, not via
          >parent.. but via the name you gave the parent.
          > - then try to close the parent via that name.
          >
          >I may hope this bug is fixed by now for all browsers.
          >The browser (MSIE) just though the child became parent of it's parent.[/color]

          That is a very convoluted way of exploiting the bug that Randy alluded
          to, an probably less reliable than the usual[1] method.

          Richard.

          [1] Not usual in the sense that this is often done as it is a really
          *bad* idea to shut down someone else's software without asking them
          first, you never know what you might be destroying in the process.


          Comment

          • Randy Webb

            #6
            Re: close browser window

            DJ WIce wrote:[color=blue]
            > : The only windows you can close via scripting are the windows that the
            > : scripting opens.
            > :
            > : you cannot close the original window that the user opens with a
            > : shortcut... (well you can but the user has the choice as you can see).
            > In the past you could:
            >
            > - open a child
            > - let the child replace the current location of the parent, not via parent..
            > but via the name you gave the parent.
            > - then try to close the parent via that name.
            >
            > I may hope this bug is fixed by now for all browsers.
            > The browser (MSIE) just though the child became parent of it's parent.[/color]

            Its not even that difficult. I can close the original page (In certain
            browsers), without opening a second window at all.


            --
            Randy

            Comment

            • Jim Ley

              #7
              Re: close browser window

              On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
              <hikksnotathome @aol.com> wrote:

              [color=blue]
              >Its not even that difficult. I can close the original page (In certain
              >browsers), without opening a second window at all.[/color]

              Yeah, but that's not really being anti-social

              screen.bufferDe pth=2

              now that's anti-social.

              Jim.
              --
              comp.lang.javas cript FAQ - http://jibbering.com/faq/

              Comment

              • Christopher Jeris

                #8
                Re: close browser window

                jim@jibbering.c om (Jim Ley) writes:[color=blue]
                > screen.bufferDe pth=2
                > now that's anti-social.[/color]

                Damn.

                That's horrible.

                Somebody should have each bone in their hands broken with
                a hammer for specifying that.

                (but did you mean 1? msdn seems to say that 2 is equivalent to -1,
                and testing on IE6 verifies this)

                --
                Chris Jeris cjeris@oinvzer. net Apply (1 6 2 4)(3 7) to domain to reply.

                Comment

                • Randy Webb

                  #9
                  Re: close browser window

                  Jim Ley wrote:
                  [color=blue]
                  > On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
                  > <hikksnotathome @aol.com> wrote:
                  >
                  >
                  >[color=green]
                  >>Its not even that difficult. I can close the original page (In certain
                  >>browsers), without opening a second window at all.[/color]
                  >
                  >
                  > Yeah, but that's not really being anti-social
                  >
                  > screen.bufferDe pth=2
                  >
                  > now that's anti-social.[/color]

                  <g> aint it though?

                  --
                  Randy

                  Comment

                  • rf

                    #10
                    Re: close browser window


                    "Jim Ley" <jim@jibbering. com> wrote in message
                    news:40082fb9.3 575651@news.cis .dfn.de...[color=blue]
                    > On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
                    > <hikksnotathome @aol.com> wrote:
                    >
                    >[color=green]
                    > >Its not even that difficult. I can close the original page (In certain
                    > >browsers), without opening a second window at all.[/color]
                    >
                    > Yeah, but that's not really being anti-social
                    >
                    > screen.bufferDe pth=2
                    >
                    > now that's anti-social.[/color]

                    Stick it in your onUnload. Then the next site gets blamed :-)

                    Cheers
                    Richard


                    Comment

                    • Jim Ley

                      #11
                      Re: close browser window

                      On Fri, 16 Jan 2004 18:39:15 GMT, jim@jibbering.c om (Jim Ley) wrote:
                      [color=blue]
                      >On Fri, 16 Jan 2004 13:06:22 -0500, Randy Webb
                      ><hikksnotathom e@aol.com> wrote:
                      >
                      >[color=green]
                      >>Its not even that difficult. I can close the original page (In certain
                      >>browsers), without opening a second window at all.[/color]
                      >
                      >Yeah, but that's not really being anti-social
                      >
                      >screen.bufferD epth=2[/color]

                      Oops sorry, it looks like 2 isn't supported (no idea why) go for 1
                      instead.

                      Jim.
                      --
                      comp.lang.javas cript FAQ - http://jibbering.com/faq/

                      Comment

                      Working...