Are there any CodeIgniter libraries that help simplify the process of using jQuery JSON with Ci?
Are there any CodeIgniter libraries that help simplify the process of using jQuery JSON
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, there is an ajax helper:
http://codeigniter.com/wiki/jQuery_Ajax_Helper
But why do you really need it?
What I usually do is just add this to my controllers:
The “
$this->input->is_ajax_request()” is part of the Input library.That way, you can use the same controllers for both ajax and non ajax requests and just conditionally include logic.
You can do GET and POST requests with jQuery .ajax: http://api.jquery.com/jQuery.ajax/