CodeIgniter Forums
Ajax Framework (CJAX) for Codeigniter 2.x+ - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Ajax Framework (CJAX) for Codeigniter 2.x+ (/showthread.php?tid=51317)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-02-2012

[eluser]rafabkn[/eluser]
Running this:

'http://localhost/test/ajax.php?sample/test/1/2/3'

from this code:

Code:
class controller_sample extends CI_Controller {
    
    function test($a,$b,$c)
    {

        //$c = new Country(); // This line from DataMapper is giving troubles with CJAX
        
        $ajax = ajax();
        die('ajax:<pre>'.print_r($ajax,1).'<pre>');


        $ajax->update('content', "Esto es AJAX");
    }

}

gives this output:

Code:
ajax:
CJAX_FRAMEWORK Object
(
    [config] => ext Object
        (
            [settings] =>
        )

    [strict] =>
    [message_id] =>
    [trace] => 0
    [xmlObjects:CoreEvents:private] =>
    [lastCmd] =>
    [selector] =>
    [loading] =>
    [fallback] =>
    [post] => Array
        (
        )

    [dir] =>
    [attach_event] => 1
    [log] =>
    [session_id] =>
    [port] => 80
    [controller_dir] =>
    [format] => cjaxFormat Object
        (
        )

    [caching] =>
    [crc32] =>
    [event] => onClick
    [text] =>
    [debug] =>
    [version] => 5.0-RC3
    [is_init] =>
    [method] =>
    [_path] =>
    [jsdir:CoreEvents:private] => cjax/core/js/
    [caller] =>
    [_flag] =>
    [_flag_count] => 0
)



Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-02-2012

[eluser]rafabkn[/eluser]
If I uncomment the line:

Code:
class controller_sample extends CI_Controller {
    
    function test($a,$b,$c)
    {

        $c = new Country(); // This line from DataMapper is giving troubles with CJAX
        
        $ajax = ajax();
        die('ajax:<pre>'.print_r($ajax,1).'<pre>');


        $ajax->update('content', "Esto es AJAX");
    }

}

I get this server error:

Code:
PHP Fatal error:  Call to undefined method CI_DB_mysql_driver::dm_call_method() in /var/www/html/test/application/libraries/datamapper.php on line 1024



Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-02-2012

[eluser]Ajaxboy[/eluser]
@rafabkn

Update:

I did some testing, and got a similar error:

( ! ) Fatal error: Call to undefined method CI_DB_mysql_driver::dm_call_method() in application\libraries\datamapper.php on line 1113

The error was there even when cjax wasn't present, this is was not a conflict with cjax, it was an actual error from DataMapper.

This error is unrelated to the Ajax Framework, and has nothing todo with Cjax.

I suggest maybe ask in DataMapper thread or to wanwizard to see if he can offer any insights.

-cj


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-02-2012

[eluser]rafabkn[/eluser]
Thank you very much for your help.

I will try in a different way for using AJAX and DataMapper.

Thank you very much for your time.


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-02-2012

[eluser]ysh[/eluser]
hello Ajaxboy, thanks a lot for the library,...starting with the library.


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-05-2012

[eluser]Simple Focus[/eluser]
Hi, I was hoping someone that has used this framework successfully can help me troubleshoot an issue.

I am trying to get CJAX to work and get 500 Internal Server errors with anything that uses the framework. This includes the default out-of-the-box request that the instruction page says should work http://www.domain.com/ajax.php?test/test, as well as any of the example files.

I have tried the following on both a local server and a production server to rule out local problems:

1. I downloaded the latest Codeigniter package (2.1.2) and got it successfully working.

2. I installed the framework (5.0 Stable) as directed on the instructions page (basically just copied the files to the server). I have done nothing else to the Codeigniter installation. I tried both with no .htaccess file and renaming the htaccess.txt to .htaccess.

Does anyone know what would cause the 500 errors? Was there something that I should have done to the default Codeigniter installation prior to attempting to install CJAX?

Thanks for your help.

Scotty Bollinger


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-05-2012

[eluser]Simple Focus[/eluser]
For anyone having the same issue, I got it working, thanks in part to help from ajaxboy. For details, see this post and the 2 underneath it.


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-05-2012

[eluser]MonsterTKE[/eluser]
@Ajaxboy

Is this library supposed to work on mobile devices?

"process unable to load function#1: _overlay();
Cannot set property 'display' of undefined"

Is the error I get on android. I am currently loading in separate views for mobile user agents, but I was wondering if there is something Im missing here?




Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-05-2012

[eluser]Ajaxboy[/eluser]
@MonsterTKE,

There have no been tests on mobile devices because there has been not demand for it, but we might start testing on mobile devices in the near future.


Ajax Framework (CJAX) for Codeigniter 2.x+ - El Forum - 07-05-2012

[eluser]MonsterTKE[/eluser]
[quote author="Ajaxboy" date="1341554376"]@MonsterTKE,

There have no been tests on mobile devices because there has been not demand for it, but we might start testing on mobile devices in the near future.[/quote]

Yeah, I totally understand, I just write my views without ajax, then I copy and rename them to mobile_whateverView then I add the Ajax stuff to the existing controller for the desktop site.

It is a pain in the ass to debug mobile sites.