Self.close() window without the dialog close?Yes/NO

Discussion in 'Javascript' started by Walter Beierdonck, Apr 29, 2004.

  1. Hi,

    I've written a script dat has to run with a windows-shortcut... ex:
    http://www.domein.com/script.php

    This is my script:
    <html>
    <head>
    <script>
    var howLong = 2000;
    t = null;
    function closeMe(){
    t = setTimeout("self.close()",howLong);
    }
    </script>
    </head>

    <BODY ONLOAD='window.closeMe()'>
    <h1>hello this box has to appaer for 2 seconds and has to close without a
    dialog box</h1>
    </body>
    </html>

    the problem is that after 2sec. a dialog box appear on my screen ask for
    closing this window

    Can some one help me so this dialog-box doesn't appear en the window just
    close

    thx,






    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.669 / Virus Database: 431 - Release Date: 26/04/2004
     
    Walter Beierdonck, Apr 29, 2004
    #1
    1. Advertising

  2. Walter Beierdonck

    Grant Wagner Guest

    Walter Beierdonck wrote:

    > Hi,
    >
    > I've written a script dat has to run with a windows-shortcut... ex:
    > http://www.domein.com/script.php
    >
    > This is my script:
    > <html>
    > <head>
    > <script>
    > var howLong = 2000;
    > t = null;
    > function closeMe(){
    > t = setTimeout("self.close()",howLong);
    > }
    > </script>
    > </head>
    >
    > <BODY ONLOAD='window.closeMe()'>
    > <h1>hello this box has to appaer for 2 seconds and has to close without a
    > dialog box</h1>
    > </body>
    > </html>
    >
    > the problem is that after 2sec. a dialog box appear on my screen ask for
    > closing this window
    >
    > Can some one help me so this dialog-box doesn't appear en the window just
    > close


    No. There is no way to reliably close a window you did not open with script, or
    that has history without the browser either a) not honoring the request
    silently or b) prompting you.

    --
    | Grant Wagner <>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 7 / Mozilla
    * http://www.mozilla.org/docs/web-developer/upgrade_2.html
     
    Grant Wagner, Apr 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralf W. Grosse-Kunstleve
    Replies:
    16
    Views:
    622
    Lonnie Princehouse
    Jul 11, 2005
  2. Ralf W. Grosse-Kunstleve
    Replies:
    18
    Views:
    623
    Bengt Richter
    Jul 11, 2005
  3. Ralf W. Grosse-Kunstleve
    Replies:
    2
    Views:
    430
    Dan Sommers
    Jul 12, 2005
  4. falcon
    Replies:
    0
    Views:
    404
    falcon
    Jul 31, 2005
  5. Jamie Herre
    Replies:
    1
    Views:
    227
    why the lucky stiff
    Jan 7, 2005
Loading...

Share This Page