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


FF1+ IE5+ Opr7+

Daily iframe content

Author: Dynamic Drive

Note: Updated Jan 17th, 05' for FireFox 1.x iframe height issue (for optional code below)

Description: This script loads a different page into an iframe daily (out of 7 days of the week). Use it to serve up daily, changing content, such as a "tip of the day." The script now offers optional code to auto resize iframe based on height of content within. New!

The script works in IE4+/NS6+, and simply displays nothing in all other browsers.

Demo: (Displays a different page depending on the day of the week)


Directions:

Simply insert the below code where you wish the content to appear, and configure the URLs inside to your own:

Select All

Optional Auto resize iframe add-on

Since the script above will be loading a different webpage into the iframe every day, it may be beneficial for the iframe's height to automatically adjust to the height of the content. Without it the iframe's height is static. If you wish to have this feature, simply add the below add-on script to your webpage as well. With it present, your iframe will auto resize to contain the content exactly (height wise).

Select All