Here's how that would work:
Code:
<html>
<head>
<script type="text/javascript">
var pages = [];
pages[0] = "http://www.blahblah.com/blah";
pages[1] = "http://www.blahblah.com/blahblah";
function updateFrame() {
// get the frame
var frame = document.getElementById("loopingFrame");
if(!pages[frame.pageIndex]) {
// first iteration -- initialize the properties
frame.pageIndex = 0;
frame.count = 1;
}
else if(pages.length <= (parseInt(frame.pageIndex)+1)) {
frame.pageIndex = 0;
// we've gone through all the pages this time, increment count
frame.count++;
}
else {
// no need for a new number, just a new base page
frame.pageIndex++;
}
var pageIndex = frame.pageIndex;
var i = frame.count;
frame.src = pages[pageIndex] + i;
}
</script>
</head>
<body>
<iframe id="loopingFrame" src="http://www.blahblah.com/blah" onload="updateFrame();">
</iframe>
</body>
</html>
That code allows for any number of pages. For example, you could have it load:
blahblah.com/blah1
blahblah.com/blahblah1
blahblah.com/blahblahblah1
blahblah.com/blah2
You would just have to add another element to the pages array, which would make those lines like:
Code:
var pages = [];
pages[0] = "http://www.blahblah.com/blah";
pages[1] = "http://www.blahblah.com/blahblah";
pages[2] = "http://www.blahblah.com/blahblahblah";
Bookmarks