• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

JQuery UI, Sortable (Serialize)

JonnyH

The Hosting Tool
NLC
Has anyone had any experience with the JQuery UI? I'm currently trying to create a package re-ordering system for THT which is sortable, eg drag and drop. The problem is, when executing the JS code to update, the function I use doesn't give me any results, but it doesn't break the JS code. Here's the TPL file for the page:
To change the order of the packages, drag and drop each box accordingly. The boxes will save after every update.<br />
<script type="text/javascript">
$(function() {
$("#sortable").sortable();
});
function update() {
var order = $('#sortable').sortable('serialize');
$("#sortable").toggle("slide");
$.get("<AJAX>?"+order+"&function=porder", function(data){$("#sortable").toggle("slide"); document.getElementById("message").innerHTML = order;});
}
</script>
<div class="errors" id="message"></div>
<div id="sortable">
%PACKS%
</div>
<div align="center"><input name="save" type="button" value="Save Order" onclick="update()" /></div>
 
Back
Top