Simple Jquery Ajax with Codeigniter Part 4
Posted on : 10-06-2009 | In : Codeigniter, Jquery, Screencasts
8
Hopefully by now you will have had a better understanding on how to use Jquery with Coedigniter. We have looked at the $.post & $.get request so far and have passed some simple data between them.
In this the last part of this series we will take a look at the $.ajax request. The $.ajax request is very powerfull and far to much to talk about in this one screencast so I would strongly suggest you take a look at the JQuery Documentation
Screencast Time: 19:18
Download Example Files here .
In a future screencast we will have another look at the Ajax request on how we can make better use of it for multiple ajax request throughout your site. So be sure to follow us by the RSS feed or Twitter.
Thank you for tunning in
.


















You have really interesting screencasts on CodeIgniter, thanks for them.
I’m really curious about” which programmng editor are you using?
Hi Peter
Been asked this one a few times now
.
Please ckick here for ide used.
tanks for the CI series keep it up . Really good work .
Peter: I think he is using TextMate with the proper “Bundles” installed. Excellent tutorials… so well done. Odd thing happens though… as soon as this is added:
window.setTimeout( function(){ }, 3000);
It stops showing the loading div in Firefox all together. It worked perfect up until then and even after in Safari… strange.
Thanks for this lecture
Nice tutorial, really well done! Help me speed up my development .
I use Web Firefox Development add ons ( https://addons.mozilla.org/en-US/firefox/addon/60) which gives you ability to disable caching
One question:
in controller is if all ok
echo 1;
I want do redirect to another controller/function
and this not working. new, redirected controller/view is echoed inside old ajaxform…
(if user roll_id is 90, then redirect to another controller, if 85 then stay this one, old controller. I think I can do echo anchor(another controller) but I want to send directly to another. How I can implement this, with this simple ajax/jguery controller? or this is impossible?)
can I do redirect if all ok and how?
Hi
If you are saying will an ajax request jump functions then the answer is no. But instead write your code to call other functions instead of redirecting.
ie
function name($string)
{
if($string != "Bob")
$this->function($string)
exit;
}
Hope it helps