self.close

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Clive Moore

    self.close

    I am using the following code to close a parent window.

    setTimeout('sel f.close()',1000 );

    Is it posible to remove the confirm dialog?

    Thanks Clive


    --
    Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
  • Erwin Moller

    #2
    Re: self.close

    Clive Moore wrote:
    [color=blue]
    > I am using the following code to close a parent window.
    >
    > setTimeout('sel f.close()',1000 );
    >
    > Is it posible to remove the confirm dialog?
    >
    > Thanks Clive
    >
    >[/color]

    Hi Clive,

    I think it works like this (correct me if I am wrong)

    The confirm dialog is there when javascript from windowA tries to close
    windowB, AND windowB was not created by Javascript.
    This is build like this to prevent that a certain window can close all you
    other windows without your permission.

    So if you want WindowA to have the possibility to close WindowB, you should
    let windowB be created by windowA (with window.open().)

    Good Luck,

    Regards,
    Erwin Moller

    Comment

    • HikksNotAtHome

      #3
      Re: self.close

      In article <dbad481065a89c 39f2fee935e2bf4 676.35643@mygat e.mailgate.org> , "Clive
      Moore" <helloclive@hot mail.com> writes:
      [color=blue]
      >I am using the following code to close a parent window.
      >
      >setTimeout('se lf.close()',100 0);
      >
      >Is it posible to remove the confirm dialog?
      >
      >Thanks Clive[/color]

      window.opener = window;
      window.close();

      exploits what some consider to be a bug in browsers.
      --
      Randy

      Comment

      Working...