scrolling alternative

admin

Administrator
Staff member
does anyone know where to find the code to have scrolling buttons rather than scroll bars? its just it would make things look a bit nicer (cause you can't make scrollbars transparent)..<br />
<br />
if you don't understand what i'm talking about, i'll see if i can post some links to some of them.<!--content-->window.scrollBy(0,10) <-- will scroll down 10 pxiels<br />
window.scrollBy(0,-10) will scrol up 10 pixels up<br />
<br />
window.scrollBy(10,0) scroll right 10 pixcels<br />
window.scrollBy(-10,0) scroll to left 10 pixels<!--content-->do i use those in an onMouseOver or onMouseClick, or something entirely different?<br />
<br />
i'm also trying to get them to make a div scroll, not a window.<!--content-->a little script should take care of that:<br />
<br />
<script><br />
var thespeed=6<br />
var myspeed=0<br />
function scrollwindow(){<br />
document.frame.scrollBy(0,myspeed)<br />
}<br />
<br />
function initializeIT(){<br />
if (myspeed!=0){<br />
scrollwindow()<br />
}<br />
}<br />
<br />
if (document.all||document.getElementById||document.layers)<br />
setInterval("initializeIT()",20)<br />
<br />
function stopscroll(){<br />
document.frame.location.href=http://www.htmlforums.com/archive/index.php/"";<br />
}<br />
<br />
</script><br />
</head><br />
<body><br />
<a href=http://www.htmlforums.com/archive/index.php/"javascript:" onmouseover="myspeed=-6" onmouseout="myspeed=-3">scroll up</a> - <br />
<a href=http://www.htmlforums.com/archive/index.php/"javascript:" onmouseover="myspeed=6" onmouseout="myspeed=3">scroll down</a> - <br />
<a href=http://www.htmlforums.com/archive/index.php/"javascript:" onmouseover="myspeed=0">Stop Scroll</a><br />
<br><br />
<div height="00" style="overflow:auto" name="frame">your div content here</div><br />
<br />
also look at couple of these:<br />
<!-- m --><a class="postlink" href="http://dynamicdrive.com/dynamicindex2/index.html">http://dynamicdrive.com/dynamicindex2/index.html</a><!-- m --><br />
those are all sort of different scrollers.<br />
<br />
and SrollBy(0,0) can be used in any kind, onmouseover,onlick,onmouseout etc. etc.<!--content-->i get an error that says document.frame is null or not an object. i tried changing document to the name of my div, but that didn't work either.<!--content-->
 
Back
Top