Forum Moderators: open
I have been trying this:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function playMusic(MFILE)
var MSIE=navigator.userAgent.indexOf("MSIE");
var NETS=navigator.userAgent.indexOf("Netscape");
var OPER=navigator.userAgent.indexOf("Opera");
if((MSIE>-1) ¦¦ (OPER>-1)) {
document.write("<BGSOUND SRC="mp3/+MFILE+.mp3" LOOP="INFINITE">");
} else {
document.write("<EMBED SRC="mp3/+MFILE+.mp3" AUTOSTART="TRUE" HIDDEN=true VOLUME=100 LOOP=TRUE>");
}
// End -->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<select name="bgsound">
<option value="javascript:playMusic('uncle#*$!er')" selectted>Uncle #*$!er
<option value="javascript:playMusic('whatwouldbrianboitanodo')">What would Brian Boitano do?
<option value="javascript:playMusic('blamecanada')">Blame Canada
<option value=""javascript:playMusic('')"">Disable music
</select>
</body>
</html>
it wont work... whats wrong with it?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function playMusic(MFILE)
var MSIE=navigator.userAgent.indexOf("MSIE");
var NETS=navigator.userAgent.indexOf("Netscape");
var OPER=navigator.userAgent.indexOf("Opera");
if((MSIE>-1) ¦¦ (OPER>-1)) {
document.write('<EMBED SRC="mp3/'+MFILE+'.mp3" LOOP="INFINITE">');
} else {
document.write('<BGSOUND SRC="mp3/'+MFILE+'.mp3" LOOP="INFINITE">');
}
// End -->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<select name="bgsound">
<option value="javascript:playMusic('uncle#*$!er')" selectted>Uncle #*$!er
<option value="javascript:playMusic('whatwouldbrianboitanodo')">What would Brian Boitano do?
<option value="javascript:playMusic('blamecanada')">Blame Canada
<option value=""javascript:playMusic('')"">Disable music
</select>
</body>
</html>
Make sure you replace these broken pipes (¦) to real ones. The forum software changes them, unfortunately.