Scroll Object
The Scroll Object allows you to make a layer that has a JavaScript generated scrollbar by which the user can scroll the content of the layer up and down. Though IE 4 has the IFRAME tag which can be used for scroll content there are limitations to it - it can't be transparent, and other layers cannot be positioned over it. Netscape does not have any built-in ability to scroll a layer, so there's no choice but to go with a pure-JavaScript solution. That's why I built the Scroll Object - it's solves these problems.
The Scroll Object totally replaces the need for my previous Scrollbar script. Here is a list of the new or updated functionality:
- easy to set up, and use
- customizable colors and dimensions
- built-in support for images and image rollovers
- keeps track of nested information internally
- object oriented so you make multiple scroll layers on the same page
- content for the scroll layer can be in the same page (inline) or another html file (external) using the same script
- for IE it uses an IFRAME only as a buffer for the content of the layer therefore avoiding most of the problems that were in my previous scrollbar script:
- scroll layers can be transparent
- no mouse interuption because of IFRAME
- scroll can be more easily manipulated (moved, slid, clipped, layered)
- has it's own history tracker so that you can make back, forward, and reload navigation buttons
- if the content is shorter than the scroll boundaries the scrollbar will disappear
- Initializes itself as a Dynamic Layer so that you can hide/show/move the whole scroll
Known Issues:
- the content layers must contain a small amount of code to activate the scroll mechanism
- difficult for the content layers to contain much JavaScript (but it is possible)
- FIXED: previously did not work on Macintosh (due to minor bug)
Future Enhancements:
- I will very likely rework the code to allow even greater flexibility in it's appearance, ie. "unglue" the scrollbar from the window and and allow independent dimensions to be applied to it.
There's a lot stuff to explain so I've separated this column into the following sections: