Hello

I have been trying make a sortable list that sorts elements among different 
unordered lists and sends the data to a script to update the order in a a 
database.  The problem I'm having right now is that the get request is only 
sending the data from the <ul> that the element is dropped into.  So it would 
start reordering the list from that point even if it's not the first one.  
Here is my code so far:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>

<head>
  <title></title>
  <meta name="GENERATOR" content="Quanta Plus">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="jquery-ui-
personalized-1.6rc4.min.js"></script>

<script type='text/javascript'>

$(function() {
                $("#group-1, #group-2").sortable({
                        connectWith: ['.connectedSortable'],
      update: function() { 
        
        var order = $(this).sortable("serialize"); 
        $.get("up_test.php"+order); 
        $("#info").load("up_test.php?"+order);

   }
                });
        });

</script>
</head>
<body>
<div>
<table width="50%">
  <tbody>
    <tr>
      <td><h2>Gym 1</h2>
          <ul id="group-1" class="connectedSortable">
        <li id="act_1" >Student 1</li> 
        <li id="act_2">Student 2</li> 
        <li id="act_3">Student 3</li> 
        <li id="act_4">Student 4</li> </td>
</ul>
      <td>
<h2>Computers</h2>
<ul id="group-2" class="connectedSortable">
        <li id="act_5">Student 5</li> 
        <li id="act_6">Student 6</li> 
        <li id="act_7">Student 7</li> 
        <li id="act_8">Student 8</li> 
</ul>
</td>
    </tr>
  </tbody>
</table>



 <br>
</div>
<div id="info">Update statements from script will load here.</DIV>


</body>
</html>

Thank you,
Scott

Reply via email to