I am trying to autoscroll to the botem of a page, and then back up again. I would like it to scroll down, wait about 5 sec, then scroll back up to the top, wait another 5 sec, then do the whole thing over again. Im a uber jscript noob so bare with me here  What I have so far is below...
function start1 starts the scrolling down
function start2 starts the scrolling up
function stop1 halts scrolling
function top1 just leeps back up top
i would like this to happen body onload, and it just does its thing.. i know this is simple, but im not at the simple level quite yet 
thanks in advance!
<SCRIPT LANGUAGE="JavaScript">
var timeout;
var y = 0;
var step = 4;
function start1(){
if (y < 0){
y=0;
}
window.parent.scroll(0,y);
y=y + step;
timeout=setTimeout("start1()",100);
}
function start2(){
if (y >=0 ){
window.parent.scroll(0,y);
y = y - step;
}
timeout=setTimeout("start2()",100);
}
function stop1(){
clearTimeout(timeout);
}
function top1(){
window.parent.scroll(0,0);
y=0;
}
</SCRIPT>
|