CodeIgniter Forums
Does is CodeIgniter support AJAX ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Does is CodeIgniter support AJAX ? (/showthread.php?tid=3812)



Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]ningnoht[/eluser]
Does is CodeIgniter support AJAX ?


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]xwero[/eluser]
No not out of the box. You need to add some library (php or javascript) to use ajax.


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]ningnoht[/eluser]
Thank you , that mean CodeIgniter can use Ajax ?


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]xwero[/eluser]
Of course, as long as you can output strings you can use ajax.


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]Matthew Pennell[/eluser]
Yes, you can build an application on CodeIgniter that uses Ajax. I believe someone has written helpers for Prototype/Scriptaculous, and also a XAJAX library. Have a look in the Wiki for more details. Smile


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]obiron2[/eluser]
Don't confuse Ajax, which is a collection of standard techniques with packaged solutions like Xajax or Scriptaculous which offer enhanced management of Ajax routines. Think of it a bit like PHP and CI. You can code in PHP without CI, but CI makes it easier by taking some of the drudge out.

I code ajax calls which simply call a function in a controller via a URL and return a HTTP formatted string (like serving a whole page) which I then drop into the relevant DIV in the page.

Ajax can be made to do a whole lot more (e.g. XML transformations) but I don't need it. Ajax is simply a different way to submit a URL and get back a result, so yes, CI supports Ajax because your browser supports Javascript.

Obiron


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]xwero[/eluser]
To set the record straight on prototype/scriptaculous. Prototype is the base library with the ajax functions and scriptaculous is the UI extension of prototype.

I don't think you can compare ajax to javascript as CI to php. For a right comparison you have to compare it to a php-java or php-.net bridge. Ajax is made possible by a browser object that allows javascript to connect with the server to send and get data.


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]ningnoht[/eluser]
Thank you so much. :coolsmile:


Does is CodeIgniter support AJAX ? - El Forum - 10-23-2007

[eluser]ELRafael[/eluser]
Gosh!!!

AJAX = Asynchronous Javascript And XML

If you don't use XML, i believe you can't say that you use ajax, right??

We can emulate that effect (without post data) with dom and other in javascript. I have a javascript function that do this (function_name(div_to_show, param, php_backend_file)). And is not an ajax function!!

Scriptaculous/Prototype, JQuery, Xajax are frameworks to work better/faster to ajax.
Codeigniter, Cake, Symphony, ZF, Prado are frameworks to work better/faster to php.

;-)