[Javascript] innerwidth

Andrew Dunn andrew at d2k.com.au
Thu May 23 20:09:22 CDT 2002


Hi,
I have a loop as follows, which scrolls to the end of the page slowly:

function startScrolling ()
{
  	window.scrollBy(1,0);
 	i = i + 1;
 	
 	//if (keepscrolling == "true") 
  	//{
  		//alert(parseInt(i));
  		setTimeout ("startScrolling ()",60);
  	//}
  	
}

When the browser gets to the end of the page I want it to go back to the
beginning, but I can't figure out how to do it. I thought about using
innerWidth and a counter (i) but I can't get the innerWidth to work: here is
a link to the page:

http://d2kmail.no-ip.com/qcbricks/main_frame.htm

Thanks.



More information about the Javascript mailing list