Here I have two buttons
Only the one at the bottom works
I need the top one to scroll down and the bottom one to do the reverse
Code:
<head>
<script>
function stopScroll() {
clearTimeout(scrolldelay);
}
</script>
<script>
}
function pageScroll() {
window.scrollBy(0,80); // horizontal and vertical scroll increments
scrolldelay = setTimeout('pageScroll(3)',100); // scrolls every 100 milliseconds
</script>
<script>
function pageScroll() {
window.scrollBy(0,-80); // horizontal and vertical scroll increments
scrolldelay = setTimeout('pageScroll(2)',100); // scrolls every 100 milliseconds
}
</script>
</head>
<input type="button" onClick="pageScroll(3)" value="Scroll Page">
<a href="javascript:stopScroll()">Stop Scrolling</a>
<BR><BR><BR><BR><BR><BR><BR><BR>
<H1>test</H1>
<BR><BR><BR><BR><BR><BR><BR><BR>
test
<BR><BR><BR><BR><BR><BR><BR><BR>
test
<BR><BR><BR><BR><BR><BR><BR><BR>
<H1>test</H1>
<BR><BR><BR><BR><BR><BR><BR><BR>
test
<BR><BR><BR><BR><BR><BR><BR><BR>
test
<a href="javascript:stopScroll()">Stop Scrolling</a>
<input type="button" onClick="pageScroll(2)" value="Scroll Page">
Bookmarks