Welcome Guest, Not a member yet? Register   Sign In
Ajax From CI Controllers?
#1

[eluser]ShoeLace1291[/eluser]
I was thinking about writing my own ajax library. I was wondering if it is possible to display ajax data from CI Controllers? For example, if the url you called in the javascript ajax function led to a function within a controller class within a CI installation.

Example:
example.com/index.php/ajax/test
#2

[eluser]CroNiX[/eluser]
If you mean, can you make an ajax request to a CI controller/method and receive data back...yes.
Its not really any different than any other request to the server...you are just sending a request like /controller/method/p1/... and capturing the response back and doing something with it, like display it or alter the DOM or something.




Theme © iAndrew 2016 - Forum software by © MyBB