Hello all, and thank-you for reading my post!
Am new to javascript and am in need of a little help.
What I am attempting to do is this:
I have an iframe on a page – I’ve set the iframe up so that it randomly chooses between 10 different html pages, then displays that page.
Here is the script I am using:
<script language=”JavaScript”>
var ddd = new Array()
ddd[1] = ‘/page/a/001/index.html’
ddd[2] = ‘/page/a/002/index.html’
ddd[3] = ‘/page/a/003/index.html’
ddd[4] = ‘/page/a/004/index.html’
ddd[5] = ‘/page/a/005/index.html’
ddd[6] = ‘/page/a/006/index.html’
ddd[7] = ‘/page/a/007/index.html’
ddd[8] = ‘/page/a/008/index.html’
ddd[9] = ‘/page/a/009/index.html’
ddd[10] = ‘/page/a/010/index.html’
var xxx = Math.random()
var i = Math.round(xxx*9)+1
document.write(‘<iframe src=’+ddd[i]+’ width=300 height=597 frameborder=0 scrolling=no></iframe>’)
</script>
This script actually does work, and exactly the way it’s suppose to – HOWEVER, I am getting a little ‘javascript syntax error exclamation point’ at the bottom of the screen.
Any assistance in locating and correcting the ‘error’ would be greatly appreciated!!!
Thank-you!