AJAX and CodeIgniter

Posted on 9 September, 2008
Learn how to implement jQuery and use some AJAX functions within your CodeIgniter apps.

Show notes:

jQuery & jQuery form plugin: http://www.jquery.com
http://malsup.com/jquery/form/

AJAX Helper (Orginally by Michael Wales):
function is_ajax() { return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')); } jQuery AJAX Code, with form reset and comment updating: $(document).ready(function(){ $("#commentform").ajaxForm({ target: "#response", resetForm: true, success: function(data){ $("#comments").empty().load("<?=site_url("comment/get")?>"); }}); });
Download in: .mp4 format | .flv format (lower quality)