SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jul 2005
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Close Window in 3 Seconds...

    Hi All,
    I like to close the window after 3 seconds automatically. Could you please pointout error from my code, please. Also, let me know if I can do it without using Function in One line code. Thanks.

    CODE:
    <script type="text/javascript">
    function winClose() {
    myWindow.close()
    }
    </script>

    <body>
    self.setTimeout('winClose()', 3000);
    </body>

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    Dewsbury, UK
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this would be correct ...

    Code:
    <script type="text/javascript">
    function winClose() {
    window.close()
    }
    </script>
    
    <body>
    self.setTimeout('winClose()', 3000);
    </body>
    piniyini = the wackiness crazed within
    Check out my blog => toseef's blog


Bookmarks

Posting Permissions

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