First, I don't work much with embeds, so this is speculation. But you need to give your element an ID, as such:
<embed id="myMidi" src="music.mid">
Then, you can get to the object using document.getElementById("myMidi") . At that point, try simply changing the source:
document.getElementById("myMidi").src = "newfile.mid";
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
The "embed" tag may not allow that. What you may have to do instead is place the tag into a div, and then use JavaScript to completely rewrite the contents of the div. Research ".innerHTML".
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37