View Full Version : Auto load tabbed in IFRAME
cha-rade
03-12-2006, 10:19 PM
hello everyone..:P
I need ur help guys.. I've created a simple page that contain tabbed page in IFRAME.. the problem is, how do I make the IFRAME auto load from one tab to another tab within period of time? let say 15 second n restart back to the first tabbed.. anyone?
_Aerospace_Eng_
03-13-2006, 12:26 AM
Like a slide show type thing? Try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
var thePages = new Array()
thePages[0] = "page1.html"
thePages[1] = "page2.html"
thePages[2] = "page3.html"
thePages[3] = "page4.html"
thePages[4] = "page5.html"
thePages[5] = "page6.html"
thePages[6] = "page7.html"
var theTime = 5000; //1000 = 1 second
var i = 0;
function changePage()
{
document.getElementById('theframe').src = thePages[i];
i++;
if(i == thePages.length)
{
i = 0;
}
}
setInterval("changePage()",theTime);
</script>
</head>
<body>
<iframe src="page1.html" name="theframe" id="theframe"></iframe>
</body>
</html>
cha-rade
03-13-2006, 05:15 AM
nice, tried it just now, tq.. but can all the pages preload before display to reduce loading time... or is it possible to put all pages in tabs so that it jump from one tab to another..
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.