Help with codeigniter and json messanges - 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: Help with codeigniter and json messanges (/showthread.php?tid=29587) |
Help with codeigniter and json messanges - El Forum - 04-14-2010 [eluser]Unknown[/eluser] ok here's the probleme: I have a controller with a method that (with the help of a model) lets me eliminate a row in the database and return a json object to the browser. The probleme it's that the string never gets to the browser, i put some log messages in each step of the process, even in the _output method of the controller and i can still see the message generated by it, but it doesn't put it in the ouput; Oh, i forget to tell you guys that i was using the $.ajax method to do it, but when i try to acces the function in the controller in the url (exj: www.algo.com/libros/eliminar/25) it works just fine. Can anyone help me with this one? Help with codeigniter and json messanges - El Forum - 04-14-2010 [eluser]Unknown[/eluser] this is the minimiced version of the controller that i used: class Libros extends Controller { function Libros() {parant::Controller();} function eliminar($id) { $query_json = $this->Datalayer->eliminar_libro($id); log_message('info', 'Libros/Eliminar: '.$query_json); echo $query_json; } function _output($output) { log_message('info', 'output: '.$output); echo $output; } } Help with codeigniter and json messanges - El Forum - 04-14-2010 [eluser]bretticus[/eluser] I recommend 2 tools for you: http://getfirebug.com/ Firebug is enough for seeing what AJAX is doing and what your server is returning to it. However, you can do some cool internal PHP logging with a firebug plugin called firephp: http://www.firephp.org/ |