PDA

View Full Version : random music on my website


ricodrico
08-13-2002, 01:09 AM
Im able to get random midi files to play on my website in internet explorer but nothing plays when netscape is used to view my website

Im wondering if im missing something in my files on my webserver for netscape

<P><SCRIPT LANGUAGE="JavaScript1.2"><!--
<p align="center">_</p>
<p align="center">_
<p align="center"><!--webbot bot="HTMLMarkup" startspan --></SCRIPT><SCRIPT LANGUAGE=""><!--
var sound1="Badmoon rising.mid"
var sound2="bananaboat.mid"
var sound3="daydreambeliever.mid"
var sound4="hop.mid"
var sound5="i dig rock and roll.mid"
var sound6="islandinthesun2.mid"
var sound7="obladi-oblada.mid"
var sound8="pegsue.mid"
var sound9="ringoffire.mid"
var sound10="sloopcarib.mid"
var x=Math.round(Math.random()*9)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else x=sound10
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//--></SCRIPT> <!--webbot bot="HTMLMarkup" endspan --></P>
Thanks John

Tonz
08-13-2002, 05:54 AM
Im no expert on this , but try re-naming the var from "0"

Tonz:cool: