PDA

View Full Version : Scroll an iframe from outside



molendijk
01-26-2011, 12:18 AM
1) CODE TITLE: Scroll an iframe from outside

2) AUTHOR NAME: Arie Molendijk

3) DESCRIPTION:
A pair of scripts - one script in an iframe, the other one in the main document - allowing us to scroll the iframe 'from outside' using buttons for vertical and horizontal customized scrolling.
The buttons only show when needed, just like ordinary scroll bars.
Different scroll speeds depending on whether the buttons have mouseover, click or double click.
This is a very loose adaptation of a script seen at http://www.dynamicdrive.com/dynamicindex2/pagescroller.htm (and I think jscheuer did something similar - less complete - in the same vein, but I don't remember where).

4) URL TO CODE:
http://www.let.rug.nl/molendyk/iframe_scroller1/iframe_scroller.html

molendijk
01-26-2011, 01:01 AM
I forgot to mention that you must have html, body {overflow: hidden} in the iframe's document.
===
Arie.