I can't seem to get firefox to read the image size in my javascript. It will work in IE and firefox but firefox will not read the image size. Can anyone see the problem in my code? I am new to programming and not very good at it yet.:
[HTML]<HTML>
<HEAD>
<script language="JavaScript">
//-- Generate a random number between 0 and max.
function randomNum(max) {
var rNum=NaN
while (isNaN(rNum)) {
rNum=Math.floor(Math.random()*(max))
}
return rNum
}
var sound = new Array()
sound[0]= "banners/ad108s.swf"
sound[1]= "banners/pattern.swf"
sound[2]= "banners/math.swf"
sound[3]= "banners/font.swf"
sound[4]= "banners/banner.swf"
sound[5]= "banners/dolchbook.swf"
sound[6]= "banners/muscle.swf"
sound[7]= "banners/store.swf"
sound[8]= "banners/dolch.swf"
sound[9]= "banners/shoe.swf"
sound[10]= "banners/music.swf"
sound[11]= "banners/font.swf"
sound[12]= "banners/font.swf"
sound[13]= "banners/math.swf"
sound[14]= "banners/mathsheet.swf"
sound[15]= "banners/font.swf"
sound[16]= "banners/printpicture.swf"
sound[17]= "banners/calendar.swf"
</script>
</HEAD>
<BODY >
<p>
<script language="JavaScript">
soundFile=sound[randomNum(sound.length)]
//-- Decide whether to use embed or bgsound.
document.writeln ("<center><OBJECT classid\='clsid\:D27CDB6E\-AE6D\-11cf\-96B8\-444553540000'" +
"codebase\='http:\/\/download\.macromedia\.com\/pub\/shockwave\/cabs\/flash\/swflash\.cab\#version\=5,0,0,0'"+
"WIDTH=500 HEIGHT=90><PARAM NAME\=movie VALUE\="+soundFile+">"+
"<PARAM NAME\=quality VALUE\=high> <PARAM NAME\=bgcolor VALUE\=\#000000>"+
"<EMBED src\= "+soundFile+" quality\=high bgcolor\=\#000000"+
"WIDTH" + "=" + "500 HEIGHT " + "=" + "90 TYPE\='application\/x-shockwave-flash'"+
"PLUGINSPAGE\='http:\/\/www.macromedia.com\/shockwave\/download\/index.cgi?P1_Prod_Version\=ShockwaveFlash'>"+
"</EMBED></OBJECT></center>")
</script>[/HTML]
Thanks for your help!