Results 1 to 2 of 2

Thread: Close dhtmlwindow after x seconds

  1. #1
    Join Date
    Nov 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Close dhtmlwindow after x seconds

    1) Script Title: dhtmlwindow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

    3) Describe problem: No problem. Just asking. Is it possible to insert something like
    setTimeout("self.close();",10000) to automatically close the window after a number of seconds?

    I've tried the code above, but it doesn't seem to be working ...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Sure. Take a look at the below:

    Code:
    <script type="text/javascript">
    
    var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
    
    setTimeout(function(){googlewin.close()}, 3000)
    
    </script>
    DD Admin

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
  •