Click to See Complete Forum and Search --> : Page not Refreshing Properly


alexthomas
02-18-2003, 06:12 AM
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='"+getPage()+"'>"+
" <frame name='2' src='"+getPage()+"'>"+
" <frame name='3' src='"+getPage()+"'>"+
" </frameset>"+
" <frameset cols='33%,33%,*' >"+
" <frame name='4' src='"+getPage()+"'>"+
" <frame name='5' src='"+getPage()+"'>"+
" <frame name='6' src='"+getPage()+"'>"+
" </frameset>"+
"</frameset>"
);
}

<!--***Function GetPage***-->

function getPage(){
return (parseInt((Math.random()*6)+1)+".htm");
}

window.onload=loadFrames;
</script>
</body>
</html>

Thanks in advance

Al

khalidali63
02-18-2003, 08:35 AM
how about just doing this.

<meta http-equiv="refresh" content="5">

This will refresh every 5 secs.

cheers

Khalid

alexthomas
02-18-2003, 08:42 AM
I've already tried that one, same problem

Doh!

Al

bioS
02-18-2003, 08:46 AM
I'm having the same kind of problem, and I've remarked that the <meta http-equiv="refresh"> tag doesn't works fine in frames.

I posted a few hours ago my question about a JavaScript possible solution which infortunately causes me some problems too.

It seems that it really depends on the browser version...