xataku_nakusute
07-28-2003, 11:31 PM
how can i make a link thatll open up a page thatll have a <select> list with a buncha <option>s and when i select one, and press play, i play the corresponding song, and when i press stop, well...it stops?
ive tried using this:
<html>
<body>
<script type="text/javascript">
sound = document.slist.stitle.value;
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
function play()
{
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
play.document.write("<html>"+"<body>"+"<bgsound src='"+sound+"'>"+</body>"+"</html>");
}
function stop()
{
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
play.document.write("<html>"+"<body>"+"<bgsound src=''>"+</body>"+"</html>");
}
</script>
<select id="slist">
<option value=song1.wav>Song 1</option>
<option value=song2.wav>Song 2</option>
<option value=song3.wav>Song 3</option>
</select>
<br>
<input type="button" onclick="play()" value="Play">
<input type="button" onclick="stop()" value="Stop">
</body>
</html>
ive tried using this:
<html>
<body>
<script type="text/javascript">
sound = document.slist.stitle.value;
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
function play()
{
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
play.document.write("<html>"+"<body>"+"<bgsound src='"+sound+"'>"+</body>"+"</html>");
}
function stop()
{
play = window.open("","play_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=1, height=1");
play.document.write("<html>"+"<body>"+"<bgsound src=''>"+</body>"+"</html>");
}
</script>
<select id="slist">
<option value=song1.wav>Song 1</option>
<option value=song2.wav>Song 2</option>
<option value=song3.wav>Song 3</option>
</select>
<br>
<input type="button" onclick="play()" value="Play">
<input type="button" onclick="stop()" value="Stop">
</body>
</html>