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="JavaS cript">
//-- 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.sw f"
sound[17]= "banners/calendar.swf"
</script>
</HEAD>
<BODY >
<p>
<script language="JavaS cript">
soundFile=sound[randomNum(sound .length)]
//-- Decide whether to use embed or bgsound.
document.writel n ("<center><OBJE CT classid\='clsid \:D27CDB6E\-AE6D\-11cf\-96B8\-444553540000'" +
"codebase\='htt p:\/\/download\.macro media\.com\/pub\/shockwave\/cabs\/flash\/swflash\.cab\#v ersion\=5,0,0,0 '"+
"WIDTH=500 HEIGHT=90><PARA M NAME\=movie VALUE\="+soundF ile+">"+
"<PARAM NAME\=quality VALUE\=high> <PARAM NAME\=bgcolor VALUE\=\#000000 >"+
"<EMBED src\= "+soundFile +" quality\=high bgcolor\=\#0000 00"+
"WIDTH" + "=" + "500 HEIGHT " + "=" + "90 TYPE\='applicat ion\/x-shockwave-flash'"+
"PLUGINSPAGE\=' http:\/\/www.macromedia. com\/shockwave\/download\/index.cgi?P1_Pr od_Version\=Sho ckwaveFlash'>"+
"</EMBED></OBJECT></center>")
</script>[/HTML]
Thanks for your help!
[HTML]<HTML>
<HEAD>
<script language="JavaS cript">
//-- 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.sw f"
sound[17]= "banners/calendar.swf"
</script>
</HEAD>
<BODY >
<p>
<script language="JavaS cript">
soundFile=sound[randomNum(sound .length)]
//-- Decide whether to use embed or bgsound.
document.writel n ("<center><OBJE CT classid\='clsid \:D27CDB6E\-AE6D\-11cf\-96B8\-444553540000'" +
"codebase\='htt p:\/\/download\.macro media\.com\/pub\/shockwave\/cabs\/flash\/swflash\.cab\#v ersion\=5,0,0,0 '"+
"WIDTH=500 HEIGHT=90><PARA M NAME\=movie VALUE\="+soundF ile+">"+
"<PARAM NAME\=quality VALUE\=high> <PARAM NAME\=bgcolor VALUE\=\#000000 >"+
"<EMBED src\= "+soundFile +" quality\=high bgcolor\=\#0000 00"+
"WIDTH" + "=" + "500 HEIGHT " + "=" + "90 TYPE\='applicat ion\/x-shockwave-flash'"+
"PLUGINSPAGE\=' http:\/\/www.macromedia. com\/shockwave\/download\/index.cgi?P1_Pr od_Version\=Sho ckwaveFlash'>"+
"</EMBED></OBJECT></center>")
</script>[/HTML]
Thanks for your help!
Comment