PDA

View Full Version : The Background Sound Src property


WWPRanma
12-19-2003, 02:09 AM
I've got this code I'm using to create a form that will set the bgsound src to a different file depending on what you select. I need some help with the code though:

<Script Language="Javascript">

function choices(choice)
{
document.all["Music"].src=choice;
}

</Script>

<body>
<BGSOUND ID="Music">
<br>

<form name="choices" onChange=choices(this.options[this.selectedindex].value)>
<select name="music">
<option value="1.mp3"> First Song
<option value="2.mp3"> Second Song
<option value="3.mp3"> Third Song
</select>
</form>

Willy Duitt
12-19-2003, 03:07 PM
You can find your answer here (http://javascript.internet.com/miscellaneous/midi-menu.html).

.....Willy