Please check this out ....
http://developer.irt.org/s
Main Topics
Browse All TopicsWhy i can't change the src of the embed player to play another song...
How to do when i select a value on the dropdown menu to change the src of the embed player ?
Music Player :
<br />
<select name="musiclist" onchange="javascript:Music
<optgroup label="WMA">
<option value="WMA-1"> Unknown </option>
</optgroup>
<optgroup label="MP3">
<option value="MP3-1"> The Reason </option>
</optgroup>
<optgroup label="MIDI">
<option value="Midi-1.mid" selected> Midi-1 </option>
<option value="Midi-2.mid"> Midi-2 </option>
<option value="Midi-3.mid"> Midi-3 </option>
</optgroup>
</select>
<br />
<embed name="musicplayer" src="gallery/audio/midi-1.
<script language="javascript">
function MusicChange(list)
{
document.musicplayer.src = "gallery/audio/" + list.value;
}
</script>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Please check this out ....
http://developer.irt.org/s
the img tag can now display sound/video clips by setting the dynsrc attribute..
<img dynsrc="mid1.mid" id="musicplayer">
then the script can simply be:
document.getElementById('m
I havent tested that, so you may need to change it slightly, but that should point you in the right direction..
Business Accounts
Answer for Membership
by: BatalfPosted on 2005-03-19 at 19:53:31ID: 13584419
I have searched the net for a solution to your problem, but it's not easy to find. Someone else could probably provide you with a better solution than mine.
yDiv').rem oveChild(d ocument.ge tElementBy Id('myDiv' ).childNod es[0]); BED'); yDiv').app endChild(o bj); Change(thi s);"> mid" width="120" height="45" hidden="false" autostart="true" loop="true">
This is just a workaround:
<body>
<script language="javascript">
function MusicChange(list){
document.getElementById('m
var obj = document.createElement('EM
obj.src = list.value;
obj.width = 120;
obj.height = 45;
obj.hidden = false;
obj.autostart = '1';
obj.loop = 'false';
document.getElementById('m
}
</script>
<br />
<select name="musiclist" onchange="javascript:Music
<optgroup label="WMA">
<option value="WMA-1"> Unknown </option>
</optgroup>
<optgroup label="MP3">
<option value="MP3-1"> The Reason </option>
</optgroup>
<optgroup label="MIDI">
<option value="Midi-1.mid" selected> Midi-1 </option>
<option value="Midi-2.mid"> Midi-2 </option>
<option value="Midi-3.mid"> Midi-3 </option>
</optgroup>
</select>
<br />
<div id="myDiv">
<embed id="musicplayer" src="gallery/audio/midi-1.
</div>
</body>
</html>