Results 1 to 5 of 5

Thread: ComboBox Music

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    Canada,Quebec
    Posts
    11

    ComboBox Music

    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 ?

  2. #2

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    OnChange? Is this about JavaScript perhaps?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Location
    Canada,Quebec
    Posts
    11
    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="javascriptlay()" ; 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

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Wrong forum. This is about the Java programming language, not about the JavaScript scripting language. Got to "XML, HTML, Javascript and CGI".
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width