New Revised CSS Library Forums Web Tools
FAQs Awards Usage Terms Contact
Categories
Other Sections
Sweet Ads
Compatibility
Bookmark online:

FF1+ IE5+ Opr7+

Scrollable IFRAME

Author: Dynamic Drive

Description: Scrollable iframe renders an IFRAME with scroll up/down functionality of the page within. This is an excellent way to display external content in a contained space.

Demo:

Up | Down

Directions: Developer's View

Step 1: Add the following code where you wish the scrollable content to appear on your page:

Select All

Step 2: Ok, here's where you need to pay attention. Insert the below script in the page being loaded in the iframe, at the very end of the document source:

Select All

So to recap, insert the code of Step 1 in your main page, and code of Step 2 at the bottom of the page contained within the iframe.

Configuring the script

All exterior changes to the script is done in the HTML code of Step 1. Here you can change the iframe's dimensions and page src. You can also decrease the scroll speed by modifying "-2" and "2" in the onMouseover codes to "-1" and "1". For example:

onMouseover="scrollspeed=-1"