mkpublications
10-27-2003, 07:27 AM
Hi,
Does anybody have a pop-up script that makes the pop-up,
pop up 15 seconds AFTER the page has loaded...
Much appreciated,
Neil.
You can use setTimeout() (http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1203758) to make it wait.
mkpublications
10-27-2003, 08:38 AM
Thanks for this info., but I'm a complete novice - could you tell me how I adapt the popup script i use (below) to include setTimeout() ? Thanks and much appreciated.
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=500,left = 312,top = 134');");
}
// End -->
<A HREF="javascript:popUp(URL)>
Use something like this:
setTimeout("popUp('http://www.w3c.org'), 15000);You might also want to look at http://www.webdevfaqs.com/javascript.php#popup or http://www.webdevfaqs.com/javascript.php#centeredpopup for better popup code.