Ok heres what I’m workin on… ( Please note I am a real Novice at this)
I’m trying to make a simple HTML JukeBox for my site. I have been able to use a double list box to list the bands in one box(doublecombo) and the associated Song titles(MP3’s) for the chosen band in the second Box(stage2) and with a Submit button I can Play the file. I guess that was the easy part of the project.
What I’m trying to add now is a playlist and the controls to Add, Remove, and Play a selection from array to a playlist file which will saved server side with an m3u extension.
The controls I like to add are “Add to PLay List” “Remove From Play List” and “Play Playlist”
The final piece I’d like to add is some type of User Name validation so the m3u files gets saved with their “Handle.m3u” so Server can stream to multiple users with different Play list…
Heres the current code I have. it’s not pretty but I’m only concerned with fuctionality now and will dress up the page later using tables…
<html>
<Font Face = “Comic SANS MS” font Size = 48>
<center>
<Head>Music Box</Head>
</font>
<body bgcolor = “#606096” Text = “#FFFF00”>
<form name=”doublecombo”>
<p><select name=”example” size=”1″ onChange=”redirect(this.options.selectedIndex)”>
<option>Humble Pie</option>
<option>Eric Clapton</option>
<option>Pink Floyd</option>
<option>Uriah Heep</option>
</select>
<select name=”stage2″ size=”1″>
<option value=”
<option value=”
<option value=”
<option value=”
<option value=”
<option value=”
</select>
<form>
<input type=”button” value=” Add to Play List ” onclick=”displayHTML(this.form)”>
<br>
</form>
<input type=”button” name=”test” value=”Play Selected Title”
onClick=”go()”>
<script>
<!–
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option(“I Don’t Need No Doctor”,”
group[0][1]=new Option(“You’re So Good for Me”,”
group[0][2]=new Option(“Hallelujah”,”
group[0][3]=new Option(“I’m Ready”,”
group[0][4]=new Option(“30 Days In The Hole”,”
group[0][5]=new Option(“Play Them All”,”
group[1][0]=new Option(“How I Wish It Would Rain”,”
group[1][1]=new Option(“Old Love”,”
group[1][2]=new Option(“Riding With the King”,”
group[1][3]=new Option(“While My Guitar Gently Weeps”,”
group[2][0]=new Option(“On The Turning Away”,”
group[2][1]=new Option(“Comfortably Numb”,”
group[3][0]=new Option(“Circle Of Hands”,”
group[3][1]=new Option(“July Morning”,”
group[3][2]=new Option(“Stealing”,”
group[3][3]=new Option(“Look At Yourself”,”
group[3][4]=new Option(“Sunrise”,”
group[3][5]=new Option(“Tears In My Eyes”,”
group[3][6]=new Option(“Play All”,”
var temp=document.doublecombo.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m–)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}
function go(){
location=temp.options[temp.selectedIndex].value
}
function displayHTML(form) {
var inf = temp.options[temp.selectedIndex].value;
win = window.open(“, “, ‘popup’, ‘toolbar = no, status = no’);
win.document.write(“” + inf + “”);
}
//–>
</script>
</form>
</body>
</html>
Thanks for the takin the time to have a look at this for me…
Peace…