Hi everyone, im having a big problem, i thought i knew how to do JavaScript, how wrong i was. Right the deal is, i want to be able to have a page which has six frames, three coloms two rows, this i know how to do. However what i would like to do is have six different possible pages to go into the frames ie.
1.htm
2.htm
3.htm
4.htm
5.htm
6,htm
Then i would like to create a random number so that it picks one of these at random and loads that page into the frame. I thought that i would generate a random number in JavaScript then, use that number to call the page. ie.
(random number).htm
This is probable a really simple task, however my explination is not the best. If you can help please please do so.
This is the code i have so far:
<html>
<head>
<title>Test</title>
</head>
<script language="JavaScript">
var rnd=Math.floor(Math.random()*7);
//document.write(rnd);
</script>
<frameset rows="50%,*">
<frameset cols="33%,33%,*">
<frame name="1" src=http://www.webdeveloper.com/forum/archive/index.php/"1.htm">
<frame name="2" src="2.htm">
<frame name="3" src="3.htm">
</frameset>
<frameset cols="33%,33%,*">
<frame name="4" src="4.htm">
<frame name="5" src="5.htm">
<frame name="6" src="6.htm">
</frameset>
</frameset>
</html>
Please help
Kind Regards Alex Thomas
1.htm
2.htm
3.htm
4.htm
5.htm
6,htm
Then i would like to create a random number so that it picks one of these at random and loads that page into the frame. I thought that i would generate a random number in JavaScript then, use that number to call the page. ie.
(random number).htm
This is probable a really simple task, however my explination is not the best. If you can help please please do so.
This is the code i have so far:
<html>
<head>
<title>Test</title>
</head>
<script language="JavaScript">
var rnd=Math.floor(Math.random()*7);
//document.write(rnd);
</script>
<frameset rows="50%,*">
<frameset cols="33%,33%,*">
<frame name="1" src=http://www.webdeveloper.com/forum/archive/index.php/"1.htm">
<frame name="2" src="2.htm">
<frame name="3" src="3.htm">
</frameset>
<frameset cols="33%,33%,*">
<frame name="4" src="4.htm">
<frame name="5" src="5.htm">
<frame name="6" src="6.htm">
</frameset>
</frameset>
</html>
Please help
Kind Regards Alex Thomas