Scroll Object

Note: I happen to miss one small bug - the duplicate DynLayer in the Scroll object was pointing to the DynLayerWipeInit() function which I had removed. This was fixed 12-04-98 14:20 EST.

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 to 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 an all JavaScript solution. That's why I built the Scroll Object - it's solves these problems.

First off, take a look at what you can create using this object: demo-frames.html. It is a page with 2 scroll windows where one loads pages into the other to mimic frames.

This code has been thoroughly tested on all versions of Netscape 4 for Windows 95/98/NT, Netscape 4.05 for Linux, IE 4 and 5 for Windows 95/98/NT, and Netscape 4.01 for Mac - and it seems to work pretty well on all of them so you should have no troubles using this code. I have not tested IE for Windows 3.1, Unix or Mac, but I doubt it will work on those. I would like to recieve feedback on how it works on other platforms. If you happen to run into something that doesn't work, please notify me about it.

I have reworked the Scroll Object quite a bit. Here is a list of the new or updated functionality:

Disadvantages of this new code:

Possible Future Enhancements:

There's a lot stuff to explain so I've separated this column into the following sections:

Home Next Lesson: Creating and Destroying Layers