PDA

View Full Version : How to Delay a Pop Up By a few Seconds



topdog9926
04-08-2007, 04:08 AM
Hey People,

How do I delay the drop of a pop up, say by 10 seconds? And this pop up code is gotten from this link: http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

Thanks all.

tech_support
04-08-2007, 04:13 AM
I'm assuming that you can change this:



window.onload=initbox
to this:


var box_sec = 10 //Seconds before appearing
setTimeout(function(){initbox()},box_sec*1000)

Twey
04-08-2007, 11:47 AM
Not a good idea, though, because the page might not have loaded yet. Try:
window.onload = function() {
setTimeout(initbox, 10 * 1000);
};