Ajax Framework (CJAX) for Codeigniter 2.x+ |
[eluser]Ajaxboy[/eluser]
Hello... somenet, as specified in the CI Wiki.. all ajax controllers in Ajax Fw for CI go in application/response/ ( not application/controllers). There are two distributions of the ajax framework, be sure to follow these instructions: http://codeigniter.com/wiki/Ajax_Framewo...odeIgniter so copy in file: application/response/test.php function test, copy that: function test() { $test_array = array( 1 => ‘test1’, 2 => ‘test2’, 3 => ‘test3’ ); return $test_array; } } then you will be able to see the response you expect. -cj
[eluser]Ajaxboy[/eluser]
<b>Introducing...</b> <h2>Nightly releases..</h2> So we will be posting Nightly releases here: https://sourceforge.net/projects/cjax/fi...deIgnater/ Nightly releases/Early releases are releases that have new functionality or features or extended features/enhancements or fixes or simply "new stuff". This gives a very solid preview of what the next official release is going to be and also gives a chance to test even more for everyone. Nightly releases will not be announced so you just have to keep: https://sourceforge.net/projects/cjax/fi...deIgnater/ in your favorites. This does not mean that there will be a release every night, but rather provides a preview section whenever is necessary. When applicable, there will also be demos nightly packaging: https://sourceforge.net/projects/cjax/fi...tly/Demos/ Some times the stuff being cooked it is too good to keep out of reach, so this is a chance for anyone looking forward for new Ajax features or functionality enhancements. This is also a way to quickly address issues and make the availability of the fixes quicker.
[eluser]rafabkn[/eluser]
Hi everyone!! This is my first time posting and my English is not very good. First of all, thanks for this awesome framework. I'm newbie with CI an CJAX. I'm trying to develop a web application using the following FWs: - CodeIgniter 2.1.0 - DataMapper ORM 1.8.2.1 - Ocular Template Library - AJAXFW_4CI_5.0RC2 My question is quite simple: Does anyone get DataMapper working over CJAX? Is it possible? I had some issues installing CJAX, which I solved by linking 'cjax' folder into 'system/core'. Moreover I changed 'ajaxfw.php' and 'ajax.php' as you said in previous posts. Right now I can work with CJAX, but I've got some problems when using DataMapper into AJAX controllers (in 'application/response'). You can see one of my controllers in the code below: Code: public function save_client() This function breaks after "Error 0". Thank you very much in advance for your help.
[eluser]Ajaxboy[/eluser]
Hello rafabkn, are you including file 'ajaxfw.php'? -cj
[eluser]rafabkn[/eluser]
Hello Ajaxboy, Thanks for your soon reply. Yes, I'm including 'ajaxfw.php' in my class Construct. This is part of my controller in my Admin Controller (in 'application/controllers/admin.php'). What's the difference between write ajax functions in 'application/response' and 'application/controllers'. I've readed there is no difference. Code: class Admin extends CI_Controller { Thank you very much
[eluser]Ajaxboy[/eluser]
There is no substantial difference. Just to be sure, what is the path of the file in your code above?
[eluser]rafabkn[/eluser]
'/var/www/html/test/application/controllers/admin.php'
[eluser]Ajaxboy[/eluser]
What version of PHP are you using?, also since you mentioned you did some changes Code: linking ‘cjax’ folder into ‘system/core’. Go ahead and update to RC3, and undo the change mentioned above, then let me know how that goes
[eluser]rafabkn[/eluser]
I'm using PHP 5.3.13. I've upgraded to RC3 and I've done a clean installation. Now I have this folder tree: Code: |~application/ No links this time. I also have modified line 22 of 'ajax.php': Code: define ('AJAX_CD', 'application/response'); for this one: Code: define ('AJAX_CD', 'application/controllers'); Still the same problem. I can not use CJAX and DataMapper in same controller.
[eluser]Ajaxboy[/eluser]
Generically speaking it should work, although I haven't personally use DataMapper, there is nothing in the Ajax Framework that would prevent it from working - that is according to my sight from here. Though, lets go ahead and sort this out: Try this, do: Code: die('ajax:<pre>'.print_r($ajax,1).'<pre>'); right after: Code: $ajax = ajax(); also try this scenario, just for testing purpose: removing the DataMapper, and do the same debugging above then let me know what you see on both scenarios |
Welcome Guest, Not a member yet? Register Sign In |