this is my entire PlayList/music player code but when i try to play the file it doesn’t work can somebody help
[and another thing how would you write a cookie to store the files in the users playlist?]
[COLOR=orangered]
<html>
<head>
<title>JavaScript test</title>
<script language=”javascript”><!–//BEGIN
function addmusfile()
{
var the_data = document.the_form.the_music.value
if (the_data != “”) {
var mus_file = the_data;
var the_list = window.document.the_form.playlist;
var num_options = the_list.options.length;
var new_option = new Option;
var name= prompt(‘What is the song/movie name?’,”)
new_option.text = name;
the_list.options[num_options]= new_option;
}
}
function open(){
if (the_form.playlist.options[form.liste1.selectedIndex].text != “” && the_form.playlist.options[form.liste1.selectedIndex].text != ‘PlayList:’){
window.confirm(‘Are you sure you want to open’ + the_form.playlist.options[form.liste1.selectedIndex].text +’?’)
var win=open(“about:blank”,”Music”,”toolbars=no,scrollbars=yes”); //no decorations but scrollbars
win.document.open();
win.document.writeln(‘<style type=”text/css”><!–body {background: #000000; margin: 0px 0px 0px 0px”}–></style><embed src=”‘ + the_form.playlist.options[form.liste1.selectedIndex].text + ‘”‘ +’ loop=”-1″></embed>’)
win.document.close();
}
else {
document.write(”)
}
}
//END–></script>
<style type=”text/css”>
<!–
option.2 {font-size: 20px; ruby-align: center; text-align: center}
body {font-family: stopD; font-size: 30px; background: #000000;color: #FFFFFF; margin: 0px 0px 0px 0px}
input {width: 100%;margin: 0px 0px 0px 0px; font-family: stopD; font-size: 16px; background: #000000; border: thick double #FFFFFF; color: #FFFFFF}
input.2 {width: 100%; font-family: stopD; font-size: 16px; height: 50px; background: #000000; border: thick double #FFFFFF; color: #FFFFFF}
select {width: 100%; margin: 0px 0px 0px 0px; font-family: stopD; font-size: 16px; background: #000000; border: thick double #FFFFFF; color: #FFFFFF}
/* End of style section. Generated by AceHTML at 8/2/03 1:26:33 PM
–>
</style>
</head>
<body>
<center> MUSIC PLAYER</center>
<form name=”the_form”>
<input type=”file” name=”the_music” onChange=”addmusfile()”><br>
<select name=”playlist” size=”10″ width=”100%”>
<option class=”2″ width=”100%”>PlayList:
</select>
<input class=”2″ type=”button” value=”Play” onClick=”open()”>
</form>
</form>
</body>
</html>
[/COLOR]
?