Calling php script that interact with CI with jquery ajax ? |
[eluser]Rushino[/eluser]
Hello, It is possible to call a php script using jquery ajax that interact with our application ? If yes, how i can do this ? Thanks!
[eluser]boltsabre[/eluser]
check out the official jquery documentation, you'll want to look at post, get and ajax methods, all three allow you to interact with php scripts, but without any more details from you I don't know what else to say... I spoke too soon... check out the video tutorials on this site, there are several about how to use AJAX with CI.
[eluser]Rushino[/eluser]
Well i typically know how to use AJAX with jQuery. The problem i have is how to make the ajax scripts "to work with" the CI instance.
[eluser]cideveloper[/eluser]
In the most basic situation Controller Code: class Test extends CI_Controller { View Code: <!DOCTYPE HTML> Javascript Code: $(function() {
[eluser]Rushino[/eluser]
it seem i can't get this part to work... Code: $.get('ci188744_ajax', function(data) { it doesnt want to call the method from the controller (look like i receive no data), any idea ?
[eluser]Rushino[/eluser]
umm.. bah finally it doesnt work that well lol it only show "Why U no work ?". Any ideas ?
[eluser]toopay[/eluser]
[quote author="Rushino" date="1305138762"]Well i typically know how to use AJAX with jQuery. The problem i have is how to make the ajax scripts "to work with" the CI instance.[/quote] Which part of CI instance you pointed on?
[eluser]Rushino[/eluser]
The script called by the ajax function but well simce it can point out to a controller method that doesnt mater so that fixed my problem thanks a lots. |
Welcome Guest, Not a member yet? Register Sign In |