Scrolling Upwards

liunx

Guest
I used to know this code, but now I forget.<br />
I want a web page to slowly scroll up, like movie credits.<br />
I've looked all over the web but only found codes and even javascripts that only scroll a small section (width and height), but the one I'm looking for, if I remember correctly, scrolls the ENTIRE page and is not a script, but rather a simple HTML tag.<br />
<br />
Any ideas?<br />
<br />
Cheers!<!--content-->simple html tag? I think not. Your welcome to modify this to suit your needs. <br />
<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<br />
<html><br />
<head><br />
<title>Untitled</title><br />
<SCRIPT Language="JavaScript"><br />
<!--<br />
// number of pixels to scroll down...<br />
n = 700 <br />
function scrolldown(){ <br />
for (I=1; I<=n; I++){ <br />
parent.scroll(1,I);<br />
}<br />
} <br />
<br />
function scrollup(){<br />
for (I=n; I>=1; I--){<br />
parent.scroll(n,I);<br />
}<br />
}<br />
//--><br />
<br />
function up(){<br />
var TimerNew = setTimeout('scrolldown(); down();', 2500);<br />
}<br />
function down(){<br />
var TimerNew = setTimeout('scrollup(); up();', 2500);<br />
}<br />
</SCRIPT><br />
</head><br />
<br />
<body onLoad="up()"><br />
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br />
3 parts to this script<br />
=======================================================<br />
part 1<br />
=======================================================<br />
<br />
&nbsp;<br><br><br><br><br><br><br><br><br><br><br><br />
===================================================<br />
part 2 - this is the scroll up button<br />
====================================================<br />
<!-- --><form><br />
<input type=button value="ScrollDown" onClick="scrolldown()"><br />
</form><!--A1 --><br><br><br><br><br><br><br><br><br />
====================================================<br />
part 3 - this is the scroll down button<br />
=====================================================<br />
<!-- --><form><br />
<input type=button value="ScrollUp" onClick="scrollup()"><br />
</form><!--A1 --><br />
<br><br><br><br><br><br><br><br><br><br><br />
<br />
<br />
</body><br />
</html><!--content-->It doesn't work.<br />
I'll spend more time with it when I get home from work though.<br />
Thanks!<br />
But i'm POSITIVE it was a simply HTML code.<br />
Grr!<br />
<br />
Ah well.....since when was it ever impossible for me to be wrong?<br />
:p<!--content-->well, for auto scroll you need a js function. Most likely you just saw the function call instead of the function itself. <br />
<br />
The code I pasted in works just fine. I just retested it in IE6, N4.7, and N6. Works in all three. It scrolls down... then pauses.. then scrolls up... pauses... scrolls down.....<!--content-->Okay, i got it!<br />
COOL!<br />
Now, uh....how can I change the speed?<!--content-->the speed is the number 2500<!--content-->I figured that, but I changed it from 2500 to 500 and it still went at the same speed.<br />
<br />
I'm normally not this useless, honest!<!--content-->oops. I thought you meant the speed between scrolling up versus down. Try ajusting the number n=700 at the beginning. It isn;t speed per se, but how many pixels to scroll. It should help ya.<!--content-->Well if'n you aint the most helpful person I done ever met!<br />
<br />
Cheers!<!--content-->Thanks! Don't mind if I do! :cheers: :drunk:<!--content-->
 
Back
Top