PDA

View Full Version : DHTML popupbox



cblake843
04-09-2007, 03:14 PM
1) Script Title: DHTML announcement box (popupbox)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex11/abox.htm

3) Describe problem:
No problem with the actual script. I have been trying to modify it so it does not popup immediately on entering the page but delaying it for a few seconds. Is this possible? I have tried all i know. For example <body onload setimeout etc etc. Any advice would be appreicated deeply.

Regards
Kase

boogyman
04-09-2007, 04:47 PM
<body onload="javascript:setTimeout('function', X*1000)">

where "function" is the initialization functin and "X" is the number of seconds you want it to delay

mburt
04-09-2007, 06:46 PM
The javascript keyword can't be used there, that's only first anchor's "href" property. That undefined X won't work either:

<body onload="setTimeout(function() {element.style.display='block'}, 1000)">
Set the "element"'s display to an initial, display:none, then do as above.

1000 = 1 seconds / 1000 milliseconds.