|
Copy the code to where you want it. (in the Body section) do not copy it into the tag itself though. If you want it to be larger then change all the instances of size.
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="none">
<div id="scroll3" style="width:170px;height:150px;background-color: none;overflow:scroll">
<big>H</big>ello, this my script the scrollbar at the side works with IE4+, the up down are used for Netscape browsers(since NS does not support the adding of scrollbars to contents).
</div>
</layer>
</ilayer>
<script>
/***********************************************
* Scrollable content - Michael Land
***********************************************/
var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}
function clearup(){
if (window.temp2)
clearInterval(temp2)
}
function cleardown(){
if (window.temp)
clearInterval(temp)
}
</script>
<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
|