OK, well I'm working from the latest version which has some refinements and requires jQuery. Here's a demo of it with a countdown timer in the title (tab bar):
Code:
<!DOCTYPE html>
<html>
<head>
<title>Rotate iFrame Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<style type="text/css">
html body {height: 100%; overflow: hidden;}
iframe {width: 100%; height: 100%; position: absolute; top: 0; left: 0; border-width: 0;}
#if_two {visibility: hidden;}
</style>
</head>
<body>
<div>
<iframe id="if_one" src=""></iframe>
<iframe id="if_two" src=""></iframe>
</div>
<script>
jQuery(window).load(function(){
var pages = [ // {page: 'url', dur: seconds}
{page: 'http://www.dynamicdrive.com/forums/', dur: 120},
{page: 'http://www.dynamicdrive.com/forums/forumdisplay.php?2', dur: 5},
{page: 'http://www.dynamicdrive.com/forums/forumdisplay.php?3', dur: 3} //<-- no comma after last page object
], p, pl = p = pages.length, ciframe = -1, $ = jQuery;
while(--p > -1){
pages[p].hash = pages[p].page.split('#')[1] || '';
pages[p].hash = pages[p].hash? '#' + pages[p].hash : '';
pages[p].page = $('<a/>', {href: pages[p].page.replace(pages[p].hash, '')}).get(0);
}
function formattime(t){
var s = t % 60, m = (t - s) / 60;
s = (s + '').length < 2? '0' + s : s;
return 'Time Remaining: ' + m + ':' + s;
}
function timeit(){
var dur = pages[p].dur, timer;
document.title = formattime(dur);
timer = setInterval(function(){
document.title = formattime(--dur);
if(!dur){clearInterval(timer); loadIframe();}
}, 1000);
}
$('iframe').load(function(){
$('iframe').not(this).css({visibility: 'hidden'});
$(this).css({visibility: 'visible'});
timeit();
});
function loadIframe() {
var page = pages[(p = ++p % pl)].page;
page = [page.href, page.search? '&' : '?', 'bustcache=', new Date().getTime(), pages[p].hash].join('');
window.frames[(ciframe = ++ciframe % 2)].location.replace(page);
}
loadIframe();
});
</script>
</body>
</html>
Any questions or problems, just let me know.
Bookmarks