Monthly iFrame Content

Load a different page into an iframe for every month of the year, and optionally navigate through past and future months too.

Works in modern browsers and IE7+

Please view the source of this page to see the HTML markup and JS.





Daily iFrame Content

You can easily change the script to load daily content (hello Xmas advent calendar) by making the following modifications;

period = new Date().getMonth(), // monthly content

Becomes;

period = new Date().getDate(), // daily content

And number the "fcontent[]" page array from 1 to 31;

fcontent[1] = "01.htm"; // first day of the month
...
fcontent[31] = "31.htm"; // last day of the month

More demos and snippets

Did you find this useful? There are more demos and code snippets this way.