Getting jQuery $.ajax to work. |
[eluser]Mr Lazy[/eluser]
Hi, I am having trouble setting up a AJAX call using CI and jQuery. I think the problem is getting the URL right to the controller. I place all my jQuery code in .js files that are included within the HEAD tag, so no PHP will get executed. After a bit of research I found this post: AJAX for CodeIgniter sample code So I thought if I put the jQuery code in the .js file, the PHP will get executed and I will get a URI to my controller and everything will fall into place. Not quite.... I got this: Code: $.ajax({ Uurrghgh... OK, so is it possible to have my jQuery code in a .js file or must it be in the view.php file? Or is there a better way of doing this? Many Thanks, Stephen |
Messages In This Thread |
Getting jQuery $.ajax to work. - by El Forum - 10-28-2008, 02:52 AM
Getting jQuery $.ajax to work. - by El Forum - 10-28-2008, 03:01 AM
|