I wanted to play midi file with the OnChange command when i select any1 of about 10 choices and that it loop back if i select another one...but i cant....anyone can help me out plz ? :D
Printable View
I wanted to play midi file with the OnChange command when i select any1 of about 10 choices and that it loop back if i select another one...but i cant....anyone can help me out plz ? :D
What specifically are you having a problem with? Do you have any existing code to show?
OnChange? Is this about JavaScript perhaps?
yes!
<script type="text/javascript" language="Javascript">
// Web midi JukeBox application
function play()
{
if(document.selform.music.selectedIndex != 0)
{
document.embeds[document.selform.music.selectedIndex-1].play();
}
}
function stop()
{
if(document.selform.music.selectedIndex != 0)
{
document.embeds[document.selform.music.selectedIndex-1].stop();
}
}
</script>
<form name="selform"><select name="music" size="1">
<option VALUE="0" SELECTED>Musiques</option>
<option VALUE="1"> Hyrule's Field [OoT]</option>
<option VALUE="2">Castle [LA]</option>
</select></form><input type= "submit" onClick="javascript:play()" ; value="Play"><input type= "submit" onClick="javascript:stop()" ; value="Stop">
--------------------------------
Thats my code from now... because i cant find something to make it loop back and i dont know the code to use OnChange....thanks in advance to help me out :S
Wrong forum. This is about the Java programming language, not about the JavaScript scripting language. Got to "XML, HTML, Javascript and CGI".