javascript midi selector help - i cant get it to play right
i am trying to get a drop down menu to drop down with the names of some midi files and then when they select one it will play without showing the midi in a window so far this is the code i have
<html>
<head>
<script language="javascript">
var name = "document.navform.inchoice.options[document.navform.inchoice.selectedindex].value";
</script>
</head>
<body bgcolor="black">
<form name="navform" method="POST"><select name="inchoice" size=1>
<option value="midichoose">War of the Worlds
<option value="indy">Indiana Jones
<option value="gilligan">Gilligan's Island
<option value="title">Title 1
<option value="title2">Title 2
<option value="warcraft2">Warcraft2
<option value="starwars">Starwars
<option value="smashmouth">Smashmouth
<option value="simpsons">Simpsons
<option value="scmidi">Starcraft
<option value="jamesbond" >James Bond
<option value="gadget">Inspector Gadget
<option value="dreams">Dreams
<option value="2001">2001
</option>
</select>
</form>
<input type="button" value="PLAY" onclick="play()">
<script>
function play()
{
document.write("<bgsound src=" + name + " loop=infinite>")
}
</script>
</body>
</html>
if you would please look over this and send any problems you find with it to me! im sure it wont take long
sithlord2k posted this at 19:21 — 15th September 1999.
They have: 4 posts
Joined: Aug 1999
an added thing it accidently put a smiley instead of " followed by )
JP Stones posted this at 21:42 — 15th September 1999.
They have: 2,390 posts
Joined: Nov 1998
What happens when you use this script?
Does it open in a new window?
JP
----------
[red]The Next Step in Website Development [/red] - http://www.what-next.com
The Webmaster Promotion and Resource Center
sithlord2k posted this at 02:23 — 16th September 1999.
They have: 4 posts
Joined: Aug 1999
ya i think it does open in a new window
one more thing....i figured out one of the problems...... i didnt put .mid! i feel stupid!
Ian posted this at 18:10 — 18th September 1999.
They have: 67 posts
Joined: Aug 1999
Hi,
please go to A1 JavaScripts
http://homes.arealcity.com/A1javascripts/
and get the script called "Select-A-Midi" script. It does the same thing but works. Good Luck
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com
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.