get data in ajax - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: get data in ajax (/showthread.php?tid=58556) |
get data in ajax - El Forum - 06-24-2013 [eluser][email protected][/eluser] hi guys can someone help me. i'm trying to call the data that passes through this ajax method. how can i get data in controller? Thanks a lot Code: $( "#sortable" ).sortable({ get data in ajax - El Forum - 06-24-2013 [eluser]Pert[/eluser] Data should be an object, so Code: data = []; get data in ajax - El Forum - 06-24-2013 [eluser][email protected][/eluser] Hi @pert thank you for you response. then how can i get it using controller? Thank you. get data in ajax - El Forum - 06-24-2013 [eluser]Pert[/eluser] Code: class admin extends CI_controller Looking at your code and what it does, you might want to add everything into single POST variable with data<b>['sortorder']</b>[li.attr("id")] = i; Then you can easily loop through $this->input->post(<strong>'sortorder'</strong>); get data in ajax - El Forum - 06-24-2013 [eluser][email protected][/eluser] Thanks a lot will try it later and get back to if will work. thank you Pert |