Results 1 to 3 of 3

Thread: How to delay popup using Window Widget?

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to delay popup using Window Widget?

    1) DHTML Window widget (v1.1)

    2) http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) I would like to delay the popup I created using Window widget. I'm new at web design and I have a small site that I used this script and it works great. But I'd really like to delay it for 5 seconds or so. Any idea what modifications to the script would be necessary for this?

    Thanks!
    Josh

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

    Default

    Instead of the standard call that causes the window to launch instantly on your page:

    Code:
    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")
    Try changing the above to:

    Code:
    setTimeout(function(){
    	googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")
    	}, 5000)
    Where 5000 is in milliseconds, or 5 seconds.
    DD Admin

  3. #3
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That worked perfectly.

    Thank you for your speedy and precise reponse!

    Thanks,
    Josh

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
  •