<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script> <script src="ckeditor/ckeditor.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.noConflict(); function slideout(){ setTimeout(function(){ //$.noConflict(); $("#response").slideUp("slow", function () { }); }, 2000);} $("#response").hide(); $(function() { $("#list ul").sortable({ opacity: 0.8, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&update=update'; $.post("partnersorting.php", order, function(theResponse){alert(theResponse); $("#response").html(theResponse); $("#response").slideDown('slow'); slideout(); }); } }); }); }); </script>
<pre lang="php"> <?php include('../includes/connection.php'); $array = $_POST['arrayorder']; if ($_POST['update'] == "update"){ $count = 1; foreach ($array as $idval) { echo $query = "UPDATE ".PARTNER." SET sl_no = " . $count . " WHERE id = " . $idval.";"; mysql_query($query) ; $count ++; } echo 'All saved! refresh the page to see the changes'; } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)