<script type="text/javascript">
$(function() {
$( "#sortable" ).sortable({
update: function(event, ui) {
var Order = $(this).sortable('toArray').toString();
//dataArr = Order.split('_');
$.ajax({
type: 'POST',
url: 'updatepriority.php',
data: 'sort_order=' + Order,
success:function(result){
}
});
}
});
$( "#sortable" ).disableSelection();
});
</script>
i am using the following code to send data to url , but its not working properly.what i am missing here
<form action="updatepriority.php" method="post">
<div id="sortable">
<?php
$i = 1;
while($row = mysql_fetch_array($result))
{
?>
<div id="<?php echo $row['Property_ID']; ?>_<?php echo $row['Priority']; ?>_<?php echo $row['property_type']; ?>"><?php echo $row['property_type']; ?>-<?php echo $row['Desc']; ?>-<?php echo $row['Priority']; ?></div>
<?php $i++; }
?>
</ul>
</div>
</form>
i am trying to sort the data dynamically on drag drop.
try passing data as following code