Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts

    combobox script changes

    I have a a script where I move options from a sclect list to another select list.
    the problem is when I move a value from the first list it get deleted from that list and I don't want that to happen.

    The second problem is the user can move options from the second list to the first one. I want them to be able to delete things from the second list. but not add it to the first list.(I almost messed up the code trying to fix that.)

    The third problem is the selected index values go in to one array and the selected index text go into another array. If the user deletes something in the second box I need to have that item deleted from both of the arrays. and I don't know how to connect them.

    here is the code.
    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    
    var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
    
    function addOption(theSel, theText, theValue)
    {
      var newOpt = new Option(theText, theValue);
      var selLength = theSel.length;
      theSel.options[selLength] = newOpt;
    }
    
    function deleteOption(theSel, theIndex)
    { 
      var selLength = theSel.length;
      if(selLength>0)
      {
        theSel.options[theIndex] = null;
      }
    }
    
    function moveOptions(theSelFrom, theSelTo)
    {
      
      var selLength = theSelFrom.length;
      var selectedText = new Array();
      var selectedValues = new Array();
      var selectedCount = 0;
      
      var i;
      
      // Find the selected Options in reverse order
      // and delete them from the 'from' Select.
      for(i=selLength-1; i>=0; i--)
      {
        if(theSelFrom.options[i].selected)
        {
          selectedText[selectedCount] = theSelFrom.options[i].text;
          selectedValues[selectedCount] = theSelFrom.options[i].value;
          deleteOption(theSelFrom, i);
          selectedCount++;
        }
      }
      
      // Add the selected text/values in reverse order.
      // This will add the Options to the 'to' Select
      // in the same order as they were in the 'from' Select.
      for(i=selectedCount-1; i>=0; i--)
      {
        addOption(theSelTo, selectedText[i], selectedValues[i]);
      }
      
      if(NS4) history.go(0);
    }
    
    //-->
    </script>
    
    </head>
    <body>
    <form action="yourpage.asp" method="post">
    <table border="0">
    	<tr>
    		<td>
    			<select name="sel1" size="10" multiple="multiple">
    			<option value="1">Left1</option>
    			<option value="2">Left2</option>
    			<option value="3">Left3</option>
    			<option value="4">Left4</option>
    			<option value="5">Left5</option>
    			</select>
    		</td>
    		<td align="center" valign="middle">
    			<input type="button" value="--&gt;"
    			 onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br />
    			<input type="button" value="&lt;--"
    			 onclick="moveOptions(this.form.sel2,this.form.sel1);" />
    		</td>
    		<td>
    			<select name="sel2" size="10" multiple="multiple">
    			<option value="1">playlist</option>
    			
    			</select>
    		</td>
    	</tr>
    </table>
    </form>

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Code:
    <html>
    <head>
    <script language="JavaScript" type="text/javascript">
    <!--
    
    var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
    
    
    function deleteOption(theSel)
    { 
      var theIndex = theSel.options.selectedIndex;
      if (theIndex != -1){
        theSel.options[theIndex] = null;
      }
    }
    
    function moveOptions(theSelFrom, theSelTo)
    {
      var selLength = theSelFrom.options.length;
      for(var i=0; i<selLength; i++)
      {
        if(theSelFrom.options[i].selected)
        {
          if (!addOption(theSelTo, theSelFrom.options[i].text, theSelFrom.options[i].value)){
            theSelFrom.options[i].selected = false; //remove selection if not duplicate and added
          }
        }
      }
      
      if(NS4) history.go(0);
    }
    
    function addOption(sel, txt, val){
      //check if the option already exists
      var dupe=false;
      for (var i=0; i<sel.options.length; i++){
        if (sel.options[i].value==val && sel.options[i].text==txt){
          dupe=true;
          break;
        }
      }
      if (!dupe){ //add the option at the end
        sel.options[sel.options.length] = new Option(txt, val);
        setTimeout(function(){sel.options[sel.options.length-1].selected=true;},10); //delay selection in order for the combobox to scroll (if any) to the bottom.
      }
      return dupe;
    }
    //-->
    </script>
    
    </head>
    <body>
    <form action="yourpage.asp" method="post">
    <table border="0">
    	<tr>
    		<td>
    			<select name="sel1" size="10" multiple="multiple" onchange="this.form.sel2.selectedIndex=-1;">
    			<option value="1">Left1</option>
    			<option value="2">Left2</option>
    			<option value="3">Left3</option>
    			<option value="4">Left4</option>
    			<option value="5">Left5</option>
    			</select>
    		</td>
    		<td align="center" valign="middle">
    			<input type="button" value="--&gt;"
    			 onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br />
    			<input type="button" value="&lt;--"
    			 onclick="deleteOption(this.form.sel2);" />
    		</td>
    		<td>
    			<select name="sel2" size="3" multiple="multiple" onchange="this.form.sel1.selectedIndex=-1;">
    			<option value="1">playlist</option>
    			
    			</select>
    		</td>
    	</tr>
    </table>
    </form>
    </body>
    </html>

  • #3
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    and this does deleate the values of an deleted item from the array.

    by the way is there a way to delete all the items from an array. I was thinking something using a for loop.

  • #4
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    works fine but I had added the embedding windows media player cross browser script from this site to my old code. It worked but in your cose it dosen't work.
    http://codingforums.com/showthread.php?t=50666&page=3

    let me show you what I did to your code.
    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    
    var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
    
    
    function deleteOption(theSel)
    { 
      var theIndex = theSel.options.selectedIndex;
      if (theIndex != -1){
        theSel.options[theIndex] = null;
      }
    }
    
    function moveOptions(theSelFrom, theSelTo)
    {
      var selLength = theSelFrom.options.length;
      for(var i=0; i<selLength; i++)
      {
        if(theSelFrom.options[i].selected)
        {
          if (!addOption(theSelTo, theSelFrom.options[i].text, theSelFrom.options[i].value)){
            theSelFrom.options[i].selected = false; //remove selection if not duplicate and added
          }
        }
      }
      
      if(NS4) history.go(0);
    }
    
    function addOption(sel, txt, val){
      //check if the option already exists
      var dupe=false;
      for (var i=0; i<sel.options.length; i++){
        if (sel.options[i].value==val && sel.options[i].text==txt){
          dupe=true;
          break;
        }
      }
      if (!dupe){ //add the option at the end
        sel.options[sel.options.length] = new Option(txt, val);
        setTimeout(function(){sel.options[sel.options.length-1].selected=true;},10); //delay selection in order for the combobox to scroll (if any) to the bottom.
      }
      return dupe;
    }
    //-->
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('userChoose').value+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    
    </script>
    
    </head>
    <body>
    <form action="yourpage.asp" method="post">
    <table border="0">
    	<tr>
    		<td>
    			<select name="sel1" size="10" multiple="multiple" onchange="this.form.sel2.selectedIndex=-1;" id="misterio">
    			<option value="Rihanna - Umbrella ft. Jay-Z.mp3">Left1</option>
    			<option value="Rihanna - Umbrella ft. Jay-Z.mp3">Left2</option>
    			<option value="3">Left3</option>
    			<option value="4">Left4</option>
    			<option value="5">Left5</option>
    			</select>
    		</td>
    		<td align="center" valign="middle">
    			<input type="button" value="--&gt;"
    			 onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br />
    			<input type="button" value="&lt;--"
    			 onclick="deleteOption(this.form.sel2);" />
    		<input type="button"  onclick="song()" />
    		</td>
    		<td>
    			<select name="sel2" size="3" multiple="multiple" onchange="this.form.sel1.selectedIndex=-1;" id="userChoose">
    			<option value="1">playlist</option>
    			
    			</select>
    		</td>
    	</tr>
    </table>
    </form>
    <div id="music1">
    <object width="235" height="160" 
    classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
    type="application/x-oleobject">
    <param name="URL" value="">
    <param name="AutoStart" VALUE="True">
    <param name="uiMode" value="full">
    <embed type="application/x-mplayer2" 
    src=""
    ShowControls="1"
    width="235"
    height="160">
    </embed>
    </object>
    </div>
    
    </body>
    Last edited by riptide; 05-16-2007 at 02:46 PM. Reason: adding the url

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Move the //--> right before the </script> tag.
    Code:
    //-->
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('userChoose').value+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    
    </script>

  • #6
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    glenngv, have you improved your WMP code by the way I saw some one say something about the code playing all of their options although they didn't want it to.

    well I want it to play every option that was moved to the second select forum.(sel2)
    with out having to push play all the time.

    also
    <input type="button" onclick="Play()" />
    <input type="button" onclick="Pause()" />
    <input type="button" onclick="Stop()" />

    don't work even with
    <embed type="application/x-mplayer2"
    src=""
    ShowControls="1"
    width="250"
    enableJavaScript="true"
    height="50">
    </embed>


    I think I'm missing some of the code. I heard the functions stop,play and, pause were already defined.
    Last edited by riptide; 05-16-2007 at 08:36 PM. Reason: added another problem

  • #7
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm having so many problems.
    The code works but I want it to play all the options in the second select list.
    so I added something that selects all the options in the second list. Even though they are selected. It only plays the first selected song. I looked all over to fix that problem but found nothing. I wonder if the second box should be something else but other forum objects don't carry the value for every thing in them. maybe I should put the values in an array and have the player play it out of there.

    But glenngv you took out the arrays. Did you take them out because the value wasn't passing to the second select list. because the player actually only worked when I connected it to the first list. when you chaged the code the player could play songs from the second list and first list.

    here is what it looks like now.
    Code:
    <script language="JavaScript" type="text/javascript">
    <!--
    
    var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
    
    
    function deleteOption(theSel)
    { 
      var theIndex = theSel.options.selectedIndex;
      if (theIndex != -1){
        theSel.options[theIndex] = null;
      }
    }
    
    function moveOptions(theSelFrom, theSelTo)
    {
      var selLength = theSelFrom.options.length;
      for(var i=0; i<selLength; i++)
      {
        if(theSelFrom.options[i].selected)
        {
          if (!addOption(theSelTo, theSelFrom.options[i].text, theSelFrom.options[i].value)){
            theSelFrom.options[i].selected = false; //remove selection if not duplicate and added
          }
        }
      }
      
      if(NS4) history.go(0);
    }
    
    function addOption(sel, txt, val){
      //check if the option already exists
      var dupe=false;
      for (var i=0; i<sel.options.length; i++){
        if (sel.options[i].value==val && sel.options[i].text==txt){
          dupe=true;
          break;
        }
      }
      if (!dupe){ //add the option at the end
        sel.options[sel.options.length] = new Option(txt, val);
        setTimeout(function(){sel.options[sel.options.length-1].selected=true;},10); //delay selection in order for the combobox to scroll (if any) to the bottom.
      }
      return dupe;
    }
    
    function selectAllOptions(selStr)
    {
    	var selObj = document.getElementById(selStr);
    	for (var i=0; i<selObj.options.length; i++) {
    		selObj.options[i].selected = true;
    	}
    }
    
    
    
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('userChoose').value+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    //-->
    </script>
    
    </head>
    <body>
    <form action="yourpage.asp" method="post">
    <table border="0">
    	<tr>
    		<td>
    			<select name="sel1" size="10" multiple="multiple" onchange="this.form.sel2.selectedIndex=-1;" id="misterio">
    			<option value="Rihanna - Umbrella ft. Jay-Z.mp3">Left1</option>
    			<option value="Seal - Kiss From A Rose.mp3">Left2</option>
    			<option value="3">Left3</option>
    			<option value="4">Left4</option>
    			<option value="5">Left5</option>
    			</select>
    		</td>
    		<td align="center" valign="middle">
    			<input type="button" value="--&gt;"
    			 onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br />
    			<input type="button" value="&lt;--"
    			 onclick="deleteOption(this.form.sel2);" />
    		<input type="button"  onclick="selectAllOptions('sel2');song()" />
    		<input type="button"  onclick="music1.pause()" />
    		<input type="button"  onclick="music1.stop()" />
    		</td>
    		<td>
    			<select name="sel2" size="3" multiple="multiple" onchange="this.form.sel1.selectedIndex=-1;" id="userChoose">
    			<option value="1">playlist</option>
    			
    			</select>
    		</td>
    	</tr>
    </table>
    </form>
    <div id="music1">
    <object width="250" height="59" 
    classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
    type="application/x-oleobject">
    <param name="URL" value="">
    <param name="AutoStart" VALUE="True">
    <param name="uiMode" value="full">
    <embed type="application/x-mplayer2" 
    src=""
    ShowControls="1"
    width="250"
    height="50">
    </embed>
    </object>
    </div>

  • #8
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Do you want to play the songs one after the other? How would you know if a song finishes playing?

  • #9
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    when I tried to make this code from scratch I ran in to the same problem.

    in the end I tried to use a time out function that plays a new song after 6minutes

    but I still need to get the values into the array but if the user deletes a song from the second select list will the song be removed from the array.

    that was one of the biggest problems because you don't know what order the array will be in so using functions of the array won't work.

    is there another way to fix those two problems.

  • #10
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Try this:
    Code:
    var ctr=1;
    function playSongs(){
      var arr, len;
      var sel = document.forms[0].sel2;
      var defaultLen = 360; //6 mins
      if (ctr<sel.options.length){
        arr = sel.options[ctr].value.split("|");
        if (arr.length>0 && arr[0]){
           len = (Number(arr[1]))? Number(arr[1])*1000:defaultLen*1000; //in milliseconds       
           document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+arr[0]+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
        }
        ctr++;
        setTimeout("playSongs()", len);
      }
    }
    Code:
    <select name="sel1" size="10" multiple="multiple" onchange="this.form.sel2.selectedIndex=-1;" id="misterio">
    <option value="Rihanna - Umbrella ft. Jay-Z.mp3|300">Left1</option>
    <option value="Seal - Kiss From A Rose.mp3|250">Left2</option>
    <option value="whatever.mp3|200">Left3</option>
    <option value="whatever2.mp3|">Left4</option>
    <option value="whatever3.mp3">Left5</option>
    </select>
    ...
    <input type="button" value="Play" onclick="playSongs()" />
    You can specify the length (in seconds) of the song (if you know it) in the option value delimited by '|'. If you don't know the length, you can leave it blank and it will default to 6 minutes.

  • #11
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hum.....no error but it won't play. I was looking over option.length earlier. If you could use something like options.lengh.vaue I bet it would play. But the thing is I don't think the vaules from the options are being passed to the player.

    Code:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    
    <script language="JavaScript" type="text/javascript">
    
    
    
    <!--
    
    var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
    
    
    function deleteOption(theSel)
    { 
      var theIndex = theSel.options.selectedIndex;
      if (theIndex != -1){
        theSel.options[theIndex] = null;
      }
    }
    
    function moveOptions(theSelFrom, theSelTo)
    {
      var selLength = theSelFrom.options.length;
      for(var i=0; i<selLength; i++)
      {
        if(theSelFrom.options[i].selected)
        {
          if (!addOption(theSelTo, theSelFrom.options[i].text, theSelFrom.options[i].value)){
            theSelFrom.options[i].selected = false; //remove selection if not duplicate and added
          }
        }
      }
      
      if(NS4) history.go(0);
    }
    
    function addOption(sel, txt, val){
      //check if the option already exists
      var dupe=false;
      for (var i=0; i<sel.options.length; i++){
        if (sel.options[i].value==val && sel.options[i].text==txt){
          dupe=true;
          break;
        }
      }
      if (!dupe){ //add the option at the end
        sel.options[sel.options.length] = new Option(txt, val);
        setTimeout(function(){sel.options[sel.options.length-1].selected=true;},10); //delay selection in order for the combobox to scroll (if any) to the bottom.
      }
      return dupe;
    }
    
    function selectAllOptions(selStr)
    {
    	var selObj = document.getElementById(selStr);
    	for (var i=0; i<selObj.options.length; i++) {
    		selObj.options[i].selected = true;
    	}
    }
    
    var ctr=1;
    function playSongs(){
      var arr, len;
      var sel = document.forms[0].sel2;
      var defaultLen = 360; //6 mins
      if (ctr<sel.options.length){
        arr = sel.options[ctr].value.split("|");
        if (arr.length>0 && arr[0]){
           len = (Number(arr[1]))? Number(arr[1])*1000:defaultLen*1000; //in milliseconds       
           document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+arr[0]+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
        }
        ctr++;
        setTimeout("playSongs()", len);
      }
    }
    
    
    
    //-->
    </script>
    
    </head>
    <body>
    <form action="yourpage.asp" method="post">
    <table border="0">
    	<tr>
    		<td>
    			
    			
    			<select name="sel1" size="10" multiple="multiple" onchange="this.form.sel2.selectedIndex=-1;" id="misterio">
    <option value="Rihanna - Umbrella ft. Jay-Z.mp3|300">Left1</option>
    <option value="Seal - Kiss From A Rose.mp3|250">Left2</option>
    <option value="whatever.mp3|200">Left3</option>
    <option value="whatever2.mp3|">Left4</option>
    <option value="whatever3.mp3">Left5</option>
    </select>
    			
    			
    		</td>
    		<td align="center" valign="middle">
    			<input type="button" value="--&gt;"
    			 onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br />
    			<input type="button" value="&lt;--"
    			 onclick="deleteOption(this.form.sel2);" />
    		<input type="button" value="Play" onclick="playSongs()" />
    		
    
    		
    		</td>
    		<td>
    			<select name="sel2" size="3" multiple="multiple" onchange="this.form.sel1.selectedIndex=-1;" id="userChoose">
    			<option value="1">playlist</option>
    			
    			</select>
    		</td>
    	</tr>
    </table>
    </form>
    <div id="music1">
    <object width="250" height="59" id="Player"
    classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
    type="application/x-oleobject">
    <param name="URL" value="">
    <param name="autoStart" VALUE="true">
    <param name="uiMode" value="full">
    <param name="currentPosition" vaule="1" >
    <param name="ShowStatusBar" value="true"  >
    <embed type="application/x-mplayer2" 
    src=""
    ShowControls="0"
    width="250"
    height="50">
    </embed>
    </object>
    
    <input type="button" name="PlayMedia" value="Play" OnClick="StartMediaUp()">
    <input type="button" name="StopMedia" value="Stop" OnClick="ShutMediaDown()">
    
    <P>This example shows a minimally-functional player
    
    <script>
    <!--
    
    function StartMediaUp ()
    {
      document.Player.URL = "preludesteel.wma";
      document.Player.controls.play();
    }
    
    function ShutMediaDown ()
    {
      document.Player.controls.stop();
    }
    
    -->
    </script>
    
    
    </div>
    
    </body>

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Debug it by doing an alert.
    Code:
    var ctr=1;
    function playSongs(){
      var arr, len;
      var sel = document.forms[0].sel2;
      var defaultLen = 360; //6 mins
      if (ctr<sel.options.length){
        arr = sel.options[ctr].value.split("|");
        alert("song:"+arr[0]);
        if (arr.length>0 && arr[0]){
           len = (Number(arr[1]))? Number(arr[1])*1000:defaultLen*1000; //in milliseconds       
           document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+arr[0]+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
        }
        ctr++;
        setTimeout("playSongs()", len);
      }
    }
    Change the red part to the same tags (<object> and <embed>) as the one you used in the body.

  • #13
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    hum.....
    when I use music2 the alert comes up when I pust he play button. it gives the song file.

    when I use Player (the one in the body of the page) it does the samething
    but both times when I move the first song the alert never comes up. only the second songs file name comes up. but I know it's because I removed Playlist
    I really wasn't going to have that in there. I'll use a fieldset and lable to add playlist.

    If this is collecting the values from everything in the second select list something is wrong. it still won't play one song after another. If I push play after it stops it plays the same song again.
    Last edited by riptide; 05-18-2007 at 04:42 PM.

  • #14
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    To play the first song, change this:
    Code:
    var ctr=1;
    to
    Code:
    var ctr=0;

  • #15
    Regular Coder riptide's Avatar
    Join Date
    Jan 2007
    Posts
    143
    Thanks
    1
    Thanked 0 Times in 0 Posts
    kay. I was thinking the problem with playing all of the songs. do you think this is a part of windows media player scripting. if you saw the first post in the windows media player embeding topic the person said it would play everything.
    I really don't why this code dosen't work.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •