JavaScript Code for

Scroll Control



By Vic Phillips

www.OurSidecars.org.uk



The code provides the user with control of the scroll properties of a long page.
You can elect to start the target document with an automatic or manual scroll.
A 'floating' "Scroll Control Panel" contains the controls.
Controls include selection of Automatic or Manual Scroll,
the automatic Scroll Speed and scrolling up or down by the window height.
The 'Scroll Control Panel' can be moved to a more convenient position by
Click and Draging the Scroll Control Title.

To automatically reposition and resize Scroll Control during window resize
include onResize="javascript:ScrollInit();" in the <body> tag.

Scroll Control will automatically reposition to the initial position on resize.

The code is compatible with IE4+ and NS6.
All variables, IDs etc. are prefixed with 'Scroll' to aid compatibility with other JSs.
I use a PC and have no idea about MAC constraints.

The code is in two parts.
Part 1 contains customised variables, the size of Part 1 is <1k.
Part 2 contains the main code, the size is <13K.
Part 1 must positioned before Part 2.
Part 1 can be in the header or body of the host document.
Part 2 must be in the body of the host document.
However the code has been split as Part 2 is best placed in an external .JS file.


Copy this page to grab the code.
please leave the credit intact.






JavaScript Code for

Scroll Control

By Vic Phillips

www.OurSidecars.org.uk