Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9

Thread: Close.Window()

  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Close.Window()

    I was wondering if there was a way to open up a page and after let say 15 seconds the window would automatically close?

    Any help will be greatly appreciated,

    tsbarnes

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <script type="text/javascript">
    setTimeout('self.close()',15000);
    </script>


    however i think you will get a confirmation "are you sure you want to close window?" message

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    New Coder
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep, you're right

    Is there a way to bypass that message?
    SToFFeL

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Stoffel
    Yep, you're right

    Is there a way to bypass that message?

    no
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #5
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I believe I have read on this website previously, that if you open the new window as a pop up rather than a new window, you do not get that message when the pop up closes. I have seen here some free scripts that show you how to do exactly what you are asking - you simply nominate the amount of time to elapse before the pop-up window closes automatically. You can specify the size of the pop up window, and what attributes (if any) you want shown in the window.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually, with a slight modification of zoobie's script from here:

    http://www.codingforums.com/showthre...threadid=11890

    it is possible:

    <html>
    <head>
    <title>Self Close</title>
    <script>
    setTimeout("bye()",15000)
    function bye() {
    self.opener = this;
    self.close()
    }
    </script>
    </head>
    <body>
    </body>
    </html>

  • #7
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeah, it works! I think that I will not be so categorical in the future
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #8
    Regular Coder
    Join Date
    Nov 2002
    Location
    Carmel California
    Posts
    471
    Thanks
    0
    Thanked 1 Time in 1 Post
    hey borgtex there is a way to close a window without a message, it uses the active X controls, and I forget who, but somebody else in this forum knows how, ill reasearch this, and be back with you in short time
    Kris Hubby
    kwhubby site

  • #9
    New Coder
    Join Date
    Jan 2003
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I implemented the following code:

    <script type="text/javascript">
    setTimeout('self.close()',15000);
    </script>

    But as someone stated before (I think), that you do not get the confirmation if you use it conjuction with a popup window. That is currently how I am using and I do not get the Confirmation. FYI

    Thanks,
    tsbarnes


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •