Hi,
Thanks to all those who offfered help on my last problem. Maybe you could help with this little puppy.
I have a page, which generates six frames, and each frame contains a randomly chosen page, fine, that works. However i want the page to update/refresh every five seconds. At the moment when it refresehes, nothing changes, it simply stays the same. I have looked on the message board to see if anyone was having the same problem, someone was and i found this code:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="refresh" content=5; reload(test.htm)>
This didn't work. Can anyone sergest a solution to this problem?
Heres the code i have so far:
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="refresh" content=5; window.replace(test2.htm);>
<meta http-equiv="refresh" content=10; window.reload(test2.htm);>
</head>
<script type="text/JavaScript">
var count=6;
<!--***Function LoadFrames***-->
function loadFrames(){
document.write(
"<frameset rows='50%,*'>"+
" <frameset cols='33%,33%,*' >"+
" <frame name='1' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='2' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='3' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" </frameset>"+
" <frameset cols='33%,33%,*' >"+
" <frame name='4' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='5' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='6' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" </frameset>"+
"</frameset>"
);
}
<!--***Function GetPage***-->
function getPage(){
return (parseInt((Math.random()*6)+1)+".htm");
}
window.onload=loadFrames;
</script>
</body>
</html>
Thanks in advance
Al
Thanks to all those who offfered help on my last problem. Maybe you could help with this little puppy.
I have a page, which generates six frames, and each frame contains a randomly chosen page, fine, that works. However i want the page to update/refresh every five seconds. At the moment when it refresehes, nothing changes, it simply stays the same. I have looked on the message board to see if anyone was having the same problem, someone was and i found this code:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="refresh" content=5; reload(test.htm)>
This didn't work. Can anyone sergest a solution to this problem?
Heres the code i have so far:
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="refresh" content=5; window.replace(test2.htm);>
<meta http-equiv="refresh" content=10; window.reload(test2.htm);>
</head>
<script type="text/JavaScript">
var count=6;
<!--***Function LoadFrames***-->
function loadFrames(){
document.write(
"<frameset rows='50%,*'>"+
" <frameset cols='33%,33%,*' >"+
" <frame name='1' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='2' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='3' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" </frameset>"+
" <frameset cols='33%,33%,*' >"+
" <frame name='4' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='5' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" <frame name='6' src='http://www.webdeveloper.com/forum/archive/index.php/"+getPage()+"'>"+
" </frameset>"+
"</frameset>"
);
}
<!--***Function GetPage***-->
function getPage(){
return (parseInt((Math.random()*6)+1)+".htm");
}
window.onload=loadFrames;
</script>
</body>
</html>
Thanks in advance
Al