PDA

View Full Version : How to delay popup using Window Widget?



jdavidb9
01-06-2009, 10:27 PM
1) DHTML Window widget (v1.1)

2) http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/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

ddadmin
01-06-2009, 11:21 PM
Instead of the standard call that causes the window to launch instantly on your page:


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:


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.

jdavidb9
01-06-2009, 11:31 PM
That worked perfectly.

Thank you for your speedy and precise reponse!

Thanks,
Josh