ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Ajax Framework (CJAX) for Codeigniter 2.x+

April 29, 2012 11:33am

Subscribe [24]
  • #46 / Jun 22, 2012 7:53am

    Ajaxboy

    243 posts

    Hello XatroX,

    may I ask what version of the Ajax Framework you’re using?

  • #47 / Jun 22, 2012 7:57am

    XatroX

    7 posts

    Hello XatroX,

    may I ask what version of the Ajax Framework you’re using?

    I use version 5.0 RC 2 with CI 2.1.0

  • #48 / Jun 22, 2012 8:02am

    Ajaxboy

    243 posts

    Okay.. would you go inside file ajaxfw.php and on line 24 has a line that says…

    * $Rev: (number) $

    can you tell me what number/revision is after “$Rev:”?. Just need to check if you are really using the latest.. there was a small warning I recall and the package was re-uploaded short after, last week.

  • #49 / Jun 22, 2012 8:06am

    XatroX

    7 posts

    Okay.. would you go inside file ajaxfw.php and on line 24 has a line that says…

    * $Rev: (number) $

    can you tell me what number/revision is after “$Rev:”?. Just need to check if you are really using the latest.. there was a small warning I recall and the package was re-uploaded short after.

    $Rev: 1318 $

    is it the latest??

  • #50 / Jun 22, 2012 8:09am

    Ajaxboy

    243 posts

    Okay thanks,

    AJAX_VIEW Constant allows you to view the response on the browser, if AJAX_VIEW is not defined, for security reasons it will not show the response on the browser, so ‘AJAX_VIEW’ is optional, Though in this package comes as ‘on’ by default, but there is a small typo on the definition.

    In file ajax.php line 34,

    change:

    defined(‘AJAX_VIEW’, 1);

    to:

    define(‘AJAX_VIEW’, 1);

    (remove the extra d),

    This is a typo/ bug. Please change it, it will come as changed by next release.

    -cj

  • #51 / Jun 22, 2012 8:19am

    XatroX

    7 posts

    Okay thanks,

    AJAX_VIEW Constant allows you to view the response on the browser, if AJAX_VIEW is not defined, for security reasons it will not show the response on the browser, so ‘AJAX_VIEW’ is optional, Though in this package comes as ‘on’ by default, but there is a small typo on the definition.

    In file ajax.php line 34,

    change:

    defined(‘AJAX_VIEW’, 1);

    to:

    define(‘AJAX_VIEW’, 1);

    (remove the extra d),

    This is a typo/ bug. Please change it, it will come as changed by next release.

    -cj

    ok, , ,thanks dude :D

  • #52 / Jun 22, 2012 10:27am

    XatroX

    7 posts

    <?php echo $this->session->flashdata('message'); ?>
    <?php echo validation_errors(); ?>
    <?php
     $ajax = ajax();
     $ajax->call("http://google.co.id/ ","container-transaksi");
     $ajax->init();
    ?>
    
    <fieldset>
     <legend>Transaksi Penjualan</legend>
    
     <div id='container-transaksi'>
      
       <input type='submit' value='Pembeli Baru' />
       <input type='submit' value='Pembeli Lama' />
      
     </div>
     
    </fieldset>

    I use that script on my view, but nothing happen.
    Did i make any mistakes??

    *sorry if i repeat asking to you, i still newbie in CI and this plugins

  • #53 / Jun 22, 2012 10:29am

    Ajaxboy

    243 posts

    You are using $ajax->init(); wrong. You’d need to echo the init() function within the head tag.

    please see:

    http://cjax.sourceforge.net/docs/Iniciating_the_JavaScript_Engine.php

  • #54 / Jun 22, 2012 10:36am

    XatroX

    7 posts

    You are using $ajax->init(); wrong. You’d need to echo the init() function within the head tag.

    please see:

    http://cjax.sourceforge.net/docs/Iniciating_the_JavaScript_Engine.php

    thanks again dude..this framework are very helpfull for me 😊

  • #55 / Jun 22, 2012 11:16am

    XatroX

    7 posts

    <?php
     $ajax = ajax();
     $ajax->Exec("baru",$ajax->call("http://google.co.id/ ","container-transaksi"));
     $ajax->init(site_url());
    ?>
    
    <fieldset>
     <legend>Transaksi Penjualan</legend>
    
     <div id='container-transaksi'>
      
       <input id='baru' type='submit' value='Pembeli Baru' />
       <input type='submit' value='Pembeli Lama' />
      
     </div>
     
    </fieldset>

    I get the problem again.
    I use that code, but if i click the button, nothing happen

  • #56 / Jun 22, 2012 11:18am

    Ajaxboy

    243 posts

    within your html head tag you have to do:

    <head>
    <?php echo $ajax->init(); ?>
    </head>

    As it is stated in the docs.

    You are not echoing it.

    Instead of:

    $ajax->init();

    do:

    echo $ajax->init();
  • #57 / Jun 22, 2012 11:29am

    Ajaxboy

    243 posts

    You might want to download the samples so that you can mimic the code used:

    http://sourceforge.net/projects/cjax/files/Demos/

  • #58 / Jun 22, 2012 11:30am

    fliu

    9 posts

    hi ajaxboy,

    i tried to install the framework, but getting following error

    ************
    Message: Undefined property: empty_controller_test::$load

    Filename: response/test.php

    Line Number: 8
    **********

    please help me out, thank you.

    Frank

  • #59 / Jun 22, 2012 11:32am

    Ajaxboy

    243 posts

    Hello fliu,

    What version of php are using? and also, what url are using testing it against?

  • #60 / Jun 22, 2012 11:36am

    fliu

    9 posts

    php 5.3.8
    testing it on my local environment by http://localhost/project/ajax.php?test/test

    thanks

    Frank

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases