...

View Full Version : Filling in text



calsta
06-14-2012, 10:49 PM
Hi guys i am working on a music player and i want to make a kind of playlist, at the moment i have a list/drop down menu where you choose a song and click play, pause, shuffle etc but is it possible to place these in a different form to allow a user to create a play list, so they choose from the drop down menu click add and it will play it into a new drop down menu? if so how would this be possible?

Thanks

dan-dan
06-14-2012, 11:20 PM
Not with just HTML/CSS! You'd need to use server side scripting. You could store the data in a session or even in a database which would allow the user to come back and view them again and again.

Are you currently using any server side scripting?
Can you post your code with a more detailed explaination of what you want to do?

calsta
06-14-2012, 11:36 PM
Here's the code at the moment, i broke the song links so its not annoying but basically at the moment its just java scripted, from this can you see if i can achieve what i'm trying to do?

<object id="multiplayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" height="0" standby="Loading Microsoft Windows Media Player components..." width="0" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95">
<param NAME VALUE>
<param NAME="ShowControls" VALUE="0">
<param NAME="ShowStatusBar" VALUE="0">
<param NAME="ShowDisplay" VALUE="0">
<param NAME="DefaultFrame" VALUE="Slide">
<param NAME="Autostart" VALUE="1">
<param NAME="Loop" VALUE="True">
</object>
<form name="form">
<p></p>
<p>
<select name="playlist">

<!-- Add song info here -->
<option value="0">Hope she doesn't mind - Sean Paul</option>
<option value="1">Starry d (Dexcell Remix) - Ellie Goulding</option>
<option value="2">Paradise - Coldplay</option>
<option value="3">Bassnon - Flux Pavilion</option>
<option value="4">After Glow - Phaela</option>
<option value="5">SONG TITLE-ARTIST NAME</option>

</select>
<br>
<input TYPE="BUTTON" NAME="multiplay" VALUE="play" OnClick="play(document.forms['form'].playlist);">
<input TYPE="BUTTON" NAME="multipause" VALUE="pause" OnClick="document.multiplayer.pause(); playstate=2;">
<input TYPE="BUTTON" NAME="multishuffle" VALUE="shuffle" Onclick="
var randsg = Math.floor(Math.random()*songs.length);
document.multiplayer.FileName = songs[randsg];
document.multiplayer.scr = songs[randsg];
document.forms['form'].playlist.options[randsg].selected = true;"
</p>
</p>
</form>
<script language="JavaScript">
<!--
var playstate = 1;
shuffle = 1; // Set to 0 to always play first song in list
// Set to 1 to randomly choose the first song to play
songs=new Array();

// Add song URLs here
songs[0]="http://db.tt/3FXkYe";
songs[1]="http://db.tt/r4jwbI";
songs[2]="http://dl.dropbox.com/u/362067%20-%20Paradise.mp3";
songs[3]="http://dl.dropbox.com/u/36206790/0ass%20Cannon.m4a";
songs[4]="http://dl.dropbox.com/u/36206790/21%fterglow%20(feat.%20Soundmouse).m4a";
songs[5]="SONG URL";

if (shuffle == 1) {
var randsg = Math.floor(Math.random()*songs.length);
document.multiplayer.FileName = songs[randsg];
document.multiplayer.scr = songs[randsg];
document.forms['form'].playlist.options[randsg].selected = true;
}
function play(list) {
if (playstate == 2) {
document.multiplayer.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.multiplayer.FileName = songs[snum];
document.multiplayer.scr = songs[snum];
}
playstate = 1;
}
//-->
</script>


Not with just HTML/CSS! You'd need to use server side scripting. You could store the data in a session or even in a database which would allow the user to come back and view them again and again.

Are you currently using any server side scripting?
Can you post your code with a more detailed explaination of what you want to do?

calsta
06-14-2012, 11:38 PM
So basically what i'm trying to do is make a "text box" which contains "links" as such to add it to a playlist which is then what the buttons control



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum