Link to home
Start Free TrialLog in
Avatar of idiots
idiots

asked on

Embed Src question

Why 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:MusicChange(this);">
     <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.mid" width="120" height="45" hidden="false" autostart="true" loop="true">


<script language="javascript">

function MusicChange(list)
  {
   document.musicplayer.src = "gallery/audio/" + list.value;
  }

</script>
ASKER CERTIFIED SOLUTION
Avatar of Batalf
Batalf
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of idiots
idiots

ASKER

It can't help ...
and I don't know whose post is better...
so i'll split points ...

thanks...
Avatar of idiots

ASKER

and I can't give A:Excellent for this question...
so i gave a B instead...