php - Ajax call controller function -
this jquery code
$(document).foundation() //sorting lists , add them database $(function() { $('#sortable').sortable({ axis: 'y', opacity: 0.7, handle: 'span', update: function(event, ui) { var list_sortable = $(this).sortable('toarray').tostring(); // change order in database using ajax $.ajax({ url: "index.php/lists/update_order", type: 'post', data: {list_order:list_sortable}, success: function(data) { //finished } }); } }); });
it works if put csrf false in config, possible leave true , open controller function? if enable true 403 error.
also, in controller what's best way of updating list_order
in lists
table?
Comments
Post a Comment