• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

How to refresh sortable list

I have two sortable lists.  The top one, listA is ordered and the bottom one, listB is unordered.
When I remove an item from listA and place it in listB, the ordered listA doesn't refresh itself.  What code can I insert  that refreshes listA?

Dale


<script type="text/javascript">
$(document).ready(function() {
      $("#listA").sortable({
      connectWith: ['#listB']
      });

      $("#listB").sortable({
      connectWith: ['#listA'],
      receive: function(event, ui) {
      var candidateName= ui.item.text();
      process: processList() ;      
                        
                  },
      remove: function(event, ui) {
      var candidateName= ui.item.text();
      }
      });
});  //end of document.ready

</script>
</head>

<cfquery name="players" datasource="#request.dns#">
select first_name, Last_name from playertable where team_number = "#session.myteam#" and active = 'A'
</cfquery>

<cfquery name="getteamname" datasource="#request.dns#">
select TeamName from team where TeamNumber = "#session.myteam#"
</cfquery>

    <div id="leftColumn">
      <h3>Batting Order</h3>
      <ol id="listA">
      
      <cfoutput query="players">
      <li start=1>#players.first_name# #players.last_name#</li>
    </cfoutput>
            
      </ol>
</div>

<div id="rightColumn">
      <h3>Substitutes</h3>
      <ul id="listB">

      </ul>
</div>
</html>
0
dmarnlo
Asked:
dmarnlo
1 Solution
 
magedroshdyCommented:
Please convert if to a valid html example in order to be able to help you
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now