ID: 231
Viewed: 4100
Added: Jun 07, 2002
Version:
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
This script works with layers and a table. it makes 2 links one for up and one for down. very handy for people that don't like frames or Iframes.<br><br>Browsers: IE & NS
<!---Head--->
none
<!---Body--->
<script language="JavaScript1.2">
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=7
if (iens6){
document.write('<div id="container" style="position:relative;width:180;height:220;border:1px solid #3399CC;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:195;left:5;top:0">')
}
</script>
<table border=1 bgcolor="#c0c0c0" width="170" height="140">
<tr><td>
<ilayer name="nscontainer" width=200 height=210 clip="0,0,175,160">
<layer name="nscontent" width=190 height=190 visibility=hidden>
<!--INSERT CONTENT HERE-->
<p><font size="2" face="Arial" color="#d9e5ed">Hi, this is a scrolling script that
runs in IE and NS. This script is located at <a href="http://www.snippetlibrary.com">
www.snippetlibrary.com</a> and is free to all users that wish to use it. Please feel
free to upload more scripts so everybody else can have some pleasure. <br>
<br>
<font color="#FFFF99">Hi, this is a scrolling script that
runs in IE and NS. This script is located at <a href="http://www.snippetlibrary.com">
www.snippetlibrary.com</a> and is free to all users that wish to use it. Please feel
free to upload more scripts so everybody else can have some pleasure. </font></font></p>
<p><font size="2" face="verdana" color="#000000">Hi, this is a scrolling script that
runs in IE and NS. This script is located at <a href="http://www.snippetlibrary.com">
www.snippetlibrary.com</a> and is free to all users that wish to use it. Please feel
free to upload more scripts so everybody else can have some pleasure. <br>
<br>
<font size="1">Hi, this is a scrolling script that
runs in IE and NS. This script is located at <a href="http://www.snippetlibrary.com">
www.snippetlibrary.com</a> and is free to all users that wish to use it. Please feel
free to upload more scripts so everybody else can have some pleasure. </font></font></p>
<p>
<!--END CONTENT-->
</p>
</layer>
</ilayer>
</td></tr></table>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
<table width="170px"><td>
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)">UP</a>
<a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)">DOWN</a>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",100)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",100)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.