Is it possible to mod the code below to have a layer div move instead of the whole web page? <script language="JavaScript1.2"> var speed, currentpos=curpos1=0,alt=1,curpos2=-1 function initialize(){ if (window.parent.scrollspeed!=0){ speed=window.parent.scrollspeed scrollwindow() } } function scrollwindow(){ temp=(document.all)? document.body.scrollTop : window.pageYOffset alt=(alt==0)? 1 : 0 if (alt==0) curpos1=temp else curpos2=temp window.scrollBy(0,speed) } setInterval("initialize()",10) </script> Code (markup): I need only the layer to move on the page and not the background or anything else outside of the layer. Is this possible?? Thanks! David
Yes. psudo code that touches the topics you need var divObj = document.getElementById('myDiv'); var divTop = 50; divObj.style.position = 'absolute'; divObj.style.top = divTop + 'px'; function scrollDiv () { divObj += increment; divObj.style.top = divTop + 'px'; }