Welcome Guest, Not a member yet? Register   Sign In
Does is CodeIgniter support AJAX ?
#1

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

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

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

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

[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
#6

[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
#7

[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.
#8

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

[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.

;-)




Theme © iAndrew 2016 - Forum software by © MyBB