Anyone Know how to make the scroll bar scrolling up and down automatically? basically auto scrolling of the scrollbar of a page in iframe..... i think its a javascript
Do you mean like a news ticker or something that when the user rolls over in one direction it moves that way without them having to click?
its is similar but not really......... the scroll bar will auto scroll such as ... same function as <marquee>.. except that this will make the scrollbar scroll down then go up again and go down... etc....
it doesn't matter if its a frameset on not.... the point is whereever you put the code the scrollbar of that page will automatically start scrolling up and down.... i found this code... except that this will only scroll down it doesn't scroll up again........ can someone modify it so that it work up and down <SCRIPT language=JavaScript1.2> //change 1 to another integer to alter the scroll speed. Greater is faster var speed=1 var currentpos=0,alt=1,curpos1=0,curpos2=-1 function initialize(){ startit() } function scrollwindow(){ if (document.all && !document.getElementById) temp=document.body.scrollTop else temp=window.pageYOffset if (alt==0) alt=2 else alt=1 if (alt==0) curpos1=temp else curpos2=temp if (curpos1!=curpos2){ if (document.all) currentpos=document.body.scrollTop+speed else currentpos=window.pageYOffset+speed window.scroll(0,currentpos) } else{ currentpos=0 window.scroll(0,currentpos) } } function startit(){ setInterval("scrollwindow()",50) } window.onload=initialize </SCRIPT> Code (markup):