[Solved] Unable to get data ajax using get - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Unable to get data ajax using get (/showthread.php?tid=67642) |
[Solved] Unable to get data ajax using get - wolfgang1983 - 03-19-2017 I am unable to get any data when I echo json What I am trying to do is when use selects a image it will upload it and then display files beloing to that question_code The upload ajax part works fine just can not get the data. Question Why would the display attachment function not be able to get the data? the when $question_code is correct The get url out puts on firebug Code: http://project.com/question/ask/display_attachments/9471523086 PHP Code: $('#button-upload input[name="file"]').on('change', function() { Controller Function PHP Code: public function display_attachments($question_code) { RE: Unable to get data ajax using get - ivantcholakov - 03-19-2017 Code: $this->output->set_header('Content-Type: application/json; charset=utf-8'); RE: Unable to get data ajax using get - wolfgang1983 - 03-19-2017 (03-19-2017, 07:11 AM)ivantcholakov Wrote: That worked thanks |