DHTML Scroll Bars?
Hello,
I was wondering if anyone know the code using DHTML to make page scroll bars, like a Iframe type deal. I've looked everywere and I'v found nothing, but i know it exists. Any help is appreciated, If you can find it, pls post the entire code here or post the page url.
------------
Ken Prescott http://www.21studios.com
Ken Prescott
Grandmaster posted this at 01:15 — 22nd February 2000.
They have: 677 posts
Joined: Mar 1999
Ahh, found it. If anyones interesting the code is as follows
<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="yellow">
<div id="scroll3" style="width:170;height:150;background-color:yellow;overflow:scroll">
<big>T</big>his 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>
/*
Scrollable content Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
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=><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>
Ken Prescott
Denmark 3 posted this at 01:32 — 23rd February 2000.
They have: 881 posts
Joined: Feb 2000
Can you give me a link so I know what that looks like.
------------------
~Parker Trasborg~
Formerly- ParkerT and sixflags111
Lloyd Hassell posted this at 05:00 — 26th February 2000.
They have: 231 posts
Joined: Feb 2000
Link: www.dynamicdrive.com
There is a great scrollbar at Kelly McLarnon's homepage. Go to www.topazdesigns.com then link to her site.
Doc Ozone also uses them frequently and he may have a tutorial. www.ozones.com
------------------
Lloyd Hassell
[email protected]
http://go.to/hass
:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.