Close Window Script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Fletcher

    Close Window Script

    Hello there,

    I need a "Close Window" script ( onLoad.Close.Wi ndow() ), however i need the
    script so it don't come up with this annoying window:

    "This window is trying to close" window.

    Is there a script to stop this happening and close the window anyway?

    Simon Fletcher
    -------!-------


  • DU

    #2
    Re: Close Window Script

    Simon Fletcher wrote:
    [color=blue]
    > Hello there,
    >
    > I need a "Close Window" script ( onLoad.Close.Wi ndow() ), however i need the
    > script so it don't come up with this annoying window:
    >
    > "This window is trying to close" window.
    >
    > Is there a script to stop this happening and close the window anyway?
    >
    > Simon Fletcher
    > -------!-------
    >
    >[/color]

    A window opened by javascript can be closed by javascript. A window not
    opened with javascript can not be closed with javascript.
    A window opened by the user himself can only be closed by the user himself.



    DU
    --
    Javascript and Browser bugs:


    Comment

    • DU

      #3
      Re: Close Window Script

      HikksNotAtHome wrote:[color=blue]
      > In article <bf20v3$cag$1@n ews.eusc.inter. net>, DU <drunclear@hotR EMOVEmail.com>
      > writes:
      >
      >[color=green]
      >>Simon Fletcher wrote:
      >>
      >>[color=darkred]
      >>>Hello there,
      >>>
      >>>I need a "Close Window" script ( onLoad.Close.Wi ndow() ), however i need[/color]
      >>
      >>the
      >>[color=darkred]
      >>>script so it don't come up with this annoying window:
      >>>
      >>>"This window is trying to close" window.
      >>>
      >>>Is there a script to stop this happening and close the window anyway?
      >>>
      >>>Simon Fletcher
      >>>-------!-------
      >>>
      >>>[/color]
      >>
      >>A window opened by javascript can be closed by javascript.
      >>A window not opened with javascript can not be closed with javascript.
      >>A window opened by the user himself can only be closed by the user himself.[/color]
      >
      >
      > Try this in your browser:
      >[/color]

      Huh... I use up to 7 different browsers. :) So, which one?
      [color=blue]
      > <script type="text/javascript">
      > window.opener = window;
      > window.close();
      > </script>
      >[/color]

      I'll try it. I think Peter-Paul Koch already mentioned this hack at his
      site.


      [color=blue]
      > In a test page. IE4/5.0, it still prompts, no other browser that I have that I
      > can test it on does it prompt. NN4.80? No prompt. Closes the browser.
      >
      >[color=green]
      >>http://jibbering.com/faq/#FAQ4_14[/color]
      >
      >
      > The FAQ is wrong in this regard.[/color]

      Ok then. How about:

      A window not opened with javascript should not be closed with javascript.
      A window opened by the user himself should only be closed by the user
      himself.

      DU
      --
      Javascript and Browser bugs:


      Comment

      Working...