DHTML Lab: Scrollbars for Netscape Navigator Layers - dhtmlab.com | 5
Scrollbars for Navigator 4 LAYERs, Part I
Ever since Navigator 4, beta 1, authors have been devising ways to scroll layers. The single-layer method, used in this column, was the first to appear and is still the only way to scroll a layer's content without resorting to a second layer. That is, the layer's top and clip.top are changed, while maintaining the clip.height.
Whichever method is used, authors usually place simple start/stop buttons to control the scroll. There is no way to know how much content remains hidden, or where you are positioned in the content. Only a full-featured scrollbar can do that.
The Netscape Script
We are indebted to the Netscape article for the original idea and for some of the images used. Saved us some screen captures.
Our present column resorted to some hard-coding. As mentioned, this seemed necessary so that we could concentrate on the script routines and the scrollbar logic. In our next column, we will use the routines developed to expand our script into one that does not require any hard-coding and generates vertical scrollbars on-the-fly for any positioned element.
The complete code discussed is reproduced on the next page.
Produced by Peter Belesis andAll Rights Reserved. Legal Notices.
Created: Jan 12, 1999
Revised: Jan 12, 1999