Help - Drop Down Menu for Midi's
How's it going? I read alot of your java tutorial, but I am having a problem. I am trying to make a drop down menu that allows the user to change the midi that is playing. Also I want it to play a midi on load. Not randomly but just say like the first midi in the menu. Is this possible. If so how would i script that. I tried scipting it like the tutorial on drop down boxes 2, no button, and changed the window.location to document.index. but I still cannot get it to work at all. it loads all the midid's at once. Thank you for any help you can offer.
----------
Jim Johnson
John Pollock posted this at 20:32 — 12th October 1999.
He has: 628 posts
Joined: Mar 1999
Hmm.. I think in IE you can change the bgsound with JavaScript, but it isn't compatible with NS.
I'm not sure of a cross broswer script for it.
If you leave it as window.location it may pop up each midi in a little console window, which should work in both browsers.
Java Script: A Beginner's Guide
Page Resource
syber posted this at 01:07 — 13th October 1999.
They have: 2 posts
Joined: Sep 1999
Thank you for your speedy reply. i am sure you are extremely busy but I am not sure how to make the midi play through the other window. i modified the script alot trying to make it work. i am curious, do you have possibly enough time to give me a sample of how that might be scripted. i only need one line of code for one song so i can examine it, and copy for additional songs. Thanks once again.
----------
Jim Johnson
John Pollock posted this at 02:08 — 20th October 1999.
He has: 628 posts
Joined: Mar 1999
Sorry for the delay, I've been so busy handling business (even some things that shouldn't happen but do) that I haven't been able to post much lately.
Try this, it may work:
<FORM name="guideform">
<SELECT name="guidelinks" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<OPTION SELECTED value="#">--Choose--
<OPTION value="song1.mid">Midi 1
<OPTION value="song2.mid">Midi 2
</SELECT>
</FORM>
I think it will open the midi file in a little window, provided the viewer has a music plugin (most do by default now).
----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com
Java Script: A Beginner's Guide
Page Resource
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.