Hey everyone,
I’m setting up a website, and I’m having some javascript issues. I need a script which will do the following:
1. (Externally, as in, not from within the iFrame itself) load a random page into an iFrame2. Every 15 seconds, load a new random page
I’ve written up a basic script so far, but it doesn’t work. What am I doing wrong? (My iFrame is called sky). This script should load the random page and I have not added the timer reload yet.
<script type=”javascript”>
function PageLoad();
{
url_array=new Array()
url_array[1]=”link1″
url_array[2]=”link2″
url_array[3]=”link3″
url_array[4]=”link4″
url_array[5]=”link5″
url_array[6]=”link6″
url_array[7]=”link7″
url_array[8]=”link8″
url_array[9]=”link9″
url_array[10]=”link10″
var page=Math.floor(Math.random()*10+1)
document.sky.main.src=page
}
</script>
Thanks for any help