Submit articles - Windsurfing Video - Debt Consolidation - Debt Consolidation - Debt Consolidation

PDA

View Full Version : autoscroll loop


silentbody
Feb 18th 2009, 8:15 am
Hi,

I have the script for autoscroll.

var t;
function stopscroll()
{
clearTimeout(t);
}
function autoscroll()
{
var scrollingbox=document.getElementById('autoscrollingbox');
var scrollposition=scrollingbox.scrollTop + 2;
scrollingbox.scrollTop=scrollposition;
t=setTimeout(autoscroll,30);
}


It scrolls me the page from top to bottom. How can I make it a loop that scrolls to bottom, then continues with the top of the page and so on?



Regards,

Bogdan