![]() |
Make a list with ajax and php - 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: Make a list with ajax and php (/showthread.php?tid=55240) |
Make a list with ajax and php - El Forum - 10-16-2012 [eluser]Diegosf93[/eluser] Hi, i have this problem i want to make a list of images with ajax look this: Controller Code: public function List_Image($id="") This is only a test i´m not going to the db only want to show the id. View Code: <select name="" id="region"> JS Code: function Mostrar(){ When i click de button the only thing that it do is show me the view duplicate and nothing more, please help me. Thanks Make a list with ajax and php - El Forum - 10-16-2012 [eluser]CroNiX[/eluser] Are you using routes or something? Because the url you are sending the request to is only the method name List_Image with no controller name? Code: $.post("List_Image/"+id,{id:id},function(respuesta){ Are you using htaccess to remove index.php from the URL? If not, that needs to be a part of the URL as well. Code: $.post("http://yoursite.com/index.php/controller/List_Image/"+id,{id:id},function(respuesta){ |