|
Post by -wiz- on Mar 7, 2004 20:14:37 GMT -5
<ilayer name="scroll1" width=300 height=350 clip="0,0,170,150"> <layer name="scroll2" width=300 height=350 bgColor="black"> <div id="scroll3" style="width:300px;height:350px;background-color:black;overflow:scroll"> <font size=+1+ color="white">This is a cool script that allows you to compact any content and confine it within a scrollable mini "window" Save valuable document space while making your page more "interactive", all at the same time! This script uses two different techniques- one for IE, one for NS- to create the scrollable window. Scrollbars will be available to IE 4 users to scroll the window, while NS users will need to use the "up" and "down" buttons instead (since NS does not support the adding of scrollbars to contents). </div> </layer> </ilayer>
<script>
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>
edit as needed.
|
|