Hi all.
I have a problem. right...
I have a page that contains a loop that calls in a different page every six seconds. i.e.
Page1 - 0secs
Page2 - 6secs
Page3 - 12secs
Then after 18 seconds the counter is reset to zero and the pages are loaded again, fine that works.
What I would like to do is, if the day is Friday it loads a completely different page i.e. Friday.htm. I had it working, but you had to reload the page for it to work, however this is not suitable, as it will be running on a machine with no interaction. Therefore I think I need to incorporate it into my loop so that it checks it every time the loop begins, and if its Friday display Friday.htm, and if its not continue with the page1,2,3 loop.
I thought this would be pretty straightforward with the use of if/else statements, but my knowledge is very limited so, I抦 not sure if this is right.
Can anyone help me please?
Thanks in advance
Al
P.s.
Here is the code so far:
<html>
<head>
<title> Frame 1a </title>
<script language="JavaScript">
var first = true;
function init() {
if (first)
{first = false;
setInterval("init()", 18 * 1000);}
setTimeout("window.main.location.href = 'frame1a.htm'", 0 * 1000);
setTimeout("window.main.location.href = 'frame1b.htm'", 6 * 1000);
setTimeout("window.main.location.href = 'frame1c.htm'", 12 * 1000);
}
</script>
</head>
<frameset rows="100%,*" border=0 onload="init()">
<frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"0.htm" scrolling="no" noresize>
</frameset>
</html>
I have a problem. right...
I have a page that contains a loop that calls in a different page every six seconds. i.e.
Page1 - 0secs
Page2 - 6secs
Page3 - 12secs
Then after 18 seconds the counter is reset to zero and the pages are loaded again, fine that works.
What I would like to do is, if the day is Friday it loads a completely different page i.e. Friday.htm. I had it working, but you had to reload the page for it to work, however this is not suitable, as it will be running on a machine with no interaction. Therefore I think I need to incorporate it into my loop so that it checks it every time the loop begins, and if its Friday display Friday.htm, and if its not continue with the page1,2,3 loop.
I thought this would be pretty straightforward with the use of if/else statements, but my knowledge is very limited so, I抦 not sure if this is right.
Can anyone help me please?
Thanks in advance
Al
P.s.
Here is the code so far:
<html>
<head>
<title> Frame 1a </title>
<script language="JavaScript">
var first = true;
function init() {
if (first)
{first = false;
setInterval("init()", 18 * 1000);}
setTimeout("window.main.location.href = 'frame1a.htm'", 0 * 1000);
setTimeout("window.main.location.href = 'frame1b.htm'", 6 * 1000);
setTimeout("window.main.location.href = 'frame1c.htm'", 12 * 1000);
}
</script>
</head>
<frameset rows="100%,*" border=0 onload="init()">
<frame name="main" src=http://www.webdeveloper.com/forum/archive/index.php/"0.htm" scrolling="no" noresize>
</frameset>
</html>