Reversing page scroller script?

Results 1 to 2 of 2

Thread: Reversing page scroller script?

  1. #1
    Join Date
    Dec 1969

    Default Reversing page scroller script?

    I found a very interesting script at which scrolls a page to the bottom. My idea is to use the script in a framepage in order to change between two menus by clicking on a link, which results in a soft scrolling to the next menu page (without an ugly scrollbar). I guess the possibilities of this script are quite underestimatedl. However, it should of course be possible to scroll back to the top of the page.<BR><BR>Unfortunately I&#039;m not a HTML wizard, but it shouldn&#039;t be much of a problem to for someone accustomed with HTML to change the script this way that it scrolls back upwards to the top. Can anyone help me here? I would be very grateful for any help! Thanx in advance!<BR><BR>Artimidor,<BR><BR><BR>Here&#039;s the script I&#039;d like to revert:<BR><BR>&#060;script language="JavaScript1.2"&#062;<BR><BR>/*<BR>Top-Down scrolling window Script-<BR>© Dynamic Drive (<BR>For full source code, installation instructions,<BR>100&#039;s more free DHTML scripts, and Terms Of<BR>Use, visit<BR>*/<BR><BR>//change 1 to another integer to alter the scroll speed. Greater is faster<BR>var speed=1<BR>var currentpos=0,alt=1,curpos1=0,curpos2=-1<BR>function initialize(){<BR>startit()<BR>}<BR>function scrollwindow(){<BR>if (document.all)<BR>temp=document.body.scrollTop<BR> else<BR>temp=window.pageYOffset<BR>if (alt==0)<BR>alt=1<BR>else<BR>alt=0<BR>if (alt==0)<BR>curpos1=temp<BR>else<BR>curpos2=temp<B R>if (curpos1!=curpos2){<BR>if (document.all)<BR>currentpos=document.body.scrollT op+speed<BR>else<BR>currentpos=window.pageYOffset+ speed<BR>window.scroll(0,currentpos)<BR>}<BR>else{ <BR><BR>}<BR>}<BR>function startit(){<BR>setInterval("scrollwindow()",5)<BR>} <BR>&#060;/script&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Reversing page scroller script?

    I&#039;m a newbie myself, but have you tried changing the "speed" to a negative number ? <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts