Make a page reload not Refresh!

wxdqz

New Member
Hi,

Thanks to all those who offered help on my last problem. Maybe you could help with this little puppy. :D

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. I have found that simply pressing F5 doesn't work, nothing changes, and it simply stays the same. But when I reload the page, i.e. navigate to the page it works?!?! 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 suggest 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>

Ps, ive also tried adding a simple counter, so that when the counter reaches zero, the page is refreshed/reloaded/updates. Still didn't work. I am not dismissing this method though, so this may be an alternative way? Any suggestions are welcome.

Thanks in advance

Al
 
Back
Top