You are here: irt.org | FAQ | DHTML | Q875 [ previous next ]
Increase the setTimeout interval:
<head> <script language="JavaScript"><!-- function pageOffset() { if (document.layers) { document.layers['parentLayer'].pageX = window.pageXOffset; document.layers['parentLayer'].pageY = window.pageYOffset; } else if (document.all) { document.all['parentLayer'].style.left = document.body.scrollLeft; document.all['parentLayer'].style.top = document.body.scrollTop; } setTimeout('pageOffset()',2000); // every 2 seconds } //--></script> </head> <body onLoad="pageOffset()"> <div id="layerName" left="10" TOP="10">Some content in here</div> </body> </html>