First of all, none.html DOES NOT EXIST. You are to make your own HTML page called none. And that is not even why there is an error there is an error because when it took numb, the variable, there was something wrong with it. You changed up the code, it appears. This is the original code:
Code:
<html>
<head>
<title>
NONE
</title>
<script language="JavaScript">
function load_differ()
{
var numb = Math.round(Math.random()*3-.5);
document.getElementById('frame').src="ad_num_"+numb+".html";
}
</script>
</head>
<body onload="load_differ()">
<iframe width="200" height="125" src="none.html" id="frame">
</iframe>
</body>
</html>
and this, my friend, is the warped code (the changed up code):
Code:
<html>
<head>
<title>
NONE
</title>
<script language="JavaScript">
function load_differ()
{
var numb = Math.round(Math.random()**3*-.5);
document.getElementById('frame').src="ad_num_"+numb+".html";
}
</script>
</head>
<body onload="load_differ()">
<iframe width="200" height="125" src="none.html" id="frame">
</iframe>
</body>
</html>
Look at the warped code carefully and compare it with the original code. Any differences? The problem is highlited in the next code. Its coordinates are found at LINE 9, CHARACTERS 36 and 39:
Code:
1: <html>
2: <head>
3: <title>
4: NONE
5: </title>
6: <script language="JavaScript">
7: function load_differ()
8:
9: var numb = Math.round(Math.random()**3*-.5);
10: document.getElementById('frame').src="ad_num_"+numb+".html";
11: }
12: <script>
13: </head>
14: <body onload="load_differ()">
15: <iframe width="200" height="125" src="none.html" id="frame">
16: </iframe>
17: </body>
18: </html>
The highlited part is your problem. It should be
var numb = Math.round(Math.random()*3-.5);
and NOT
var numb = Math.round(Math.random()**3*-.5);
But that is just the beginning. I was wondering if you had even uploaded the other HTML files named ad_num_0.html, ad_num_1.html, and ad_num_2.html. If you hadn't, then please do so. If you hadn't created the HTML files, please do so. If you hadn't created a blank HTML page named none.html, please do so. Everything should be solved. You may PM or e-mail me by using the links in my signature. Hopefully all of my help helped.
-magicyte
Bookmarks