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]
  • #136 / Jul 14, 2012 9:10am

    MonsterTKE

    27 posts

    @AjaxBoy

    Now that we have a stable release, is there any chance to possibly see some debugging on mobile browsers?

  • #137 / Jul 14, 2012 5:28pm

    Ajaxboy

    243 posts

    That is currently not on the to do list, what phone OS (and browser) are you interested in debugging on ?

  • #138 / Jul 16, 2012 10:27pm

    MonsterTKE

    27 posts

    That is currently not on the to do list, what phone OS (and browser) are you interested in debugging on ?

    Well iPhone and android cover like 90% of the mobile market I think.

  • #139 / Aug 13, 2012 5:55pm

    mad82

    5 posts

    Hi, I got a problem when trying to access a controller function from a view using Cjax methods, its bit frustrating me, any help is greatly appreciated, Below is the code i used
    controller file code

    class Gethint extends CI_Controller {
    function _construct()
     {
      parent::_construct();
      $this->load->helper(array('form','url'));
       
            }
    
     public function index()
     {
      $this->load->view('click_ajax_request');
     }
    
     function click_button($message)
     {
      echo "Button clicked";
      $ajax = ajax();
      
      $ajax->success("You clicked the button.. $message");
      
     }
    }
    ?>


    Here is the View file

    <?php
    require_once "ajax.php";
    $ajax = ajax();
    $ajax->Exec("button1",$ajax->call("ajax.php?gethint/click_button/Hello!"));
    ?>
    <html>
    <head>
    <?php echo $ajax->init();?>
    </head>
    <body>
    <h2>Simple ajax request binded to a button</h2>
    <p><input type='button' id='button1' value='Click this button to make an ajax request'><br />
    </body><br />
    </html>

     

  • #140 / Aug 14, 2012 10:52am

    Ajaxboy

    243 posts

    I replied to your other post here: http://ellislab.com/forums/viewthread/222566/

  • #141 / Aug 20, 2012 5:37am

    Ayman Elarian

    10 posts

    Hello ajaxboy

    thanks for your perfect FW but after Finnish my work on my mac with chrome , i upload it to windows 2003 server with php 5.3.6
    no response came its blank , it seem that your ajax.php dont load custom codeigniter controllers

    how to fix that ?

  • #142 / Aug 20, 2012 10:37am

    Ajaxboy

    243 posts

    Assuming you are using the latest version 5.0, Could you debug with firebug?, use the console “all” to see possible response errors and also the “Net” tab to see possible loading errors.

    Additionally, you might want to turn errors on php, so if it happens to be a php error, then you’ll be able to see it.

    Since this is an older thread be sure to reply on the newer thread for 5.0: http://ellislab.com/forums/viewthread/220312/

    Also,

    Is important to note that Zend has officially dumped Windows 2003 and XP, future versions of php won’t work on these platforms.

  • #143 / Feb 07, 2013 11:58am

    mmmx

    11 posts

    Is there a way to config ajaxfw so that /cjax folder is out of public_html folder?

    I use to put system and application folder out of the public www html folder, but I can’t guess how to put there also cjax folder

    Does anyone can help me?
    Thanks

  • #144 / Feb 08, 2013 12:58am

    Ajaxboy

    243 posts

    Some of the files need public access/accessible through the browser such as the Javascript library, css, images, and ajax controllers.  If it was only php files that would make more sense.

  • #145 / Mar 13, 2013 6:27pm

    zgames

    5 posts

    hey,

    after installing i18n(tutorial) i runed into a problem


    I’m forcing language tag e.g localhost/root/en

    so when I want to access localhost/root/en/ajax.php?test/test2

    I get page not found.

    when I remove library i18n everything works as expected e.g localhost/root/ajax.php?test/test2

    how can I make it work with en tags?

    where should I look for a problem

  • #146 / Mar 16, 2013 11:44pm

    Ajaxboy

    243 posts

    I have not really played around with i18n, so I couldn’t give you an answer why is it not working properly while using it is enabled. Maybe try to turn it off if it is an ajax controller? it would have to allow being turned off, i haven’t mess with it.

  • #147 / Mar 26, 2013 8:03am

    Cgull

    93 posts

    Hi,

    A bit confused with CJAX need help.

    I would like to upload files with AJAX.

    I downloaded the latest version of CJAX: AJAXFW_4CI_5.3-Obama2012.zip and read the installation instructions:

    2. Place the contents of the zip on the root of the site merging it with your current site.
    So you’d end up with your current structure plus:

        /
        cjax/
        controllers/
        ajax.php
        testing.php

    In the folder I extracted I have:
    application/
    cjax/
    ajax.php
    ajaxfw.php
    examples.html
    htaccess.txt

    So first question is how do I install, I don’t see a controllers folder and I don’t see a testing.php file?

    Then I downloaded the latest examples, but looking at the upload example I see this:

    This controller is deprecated.
    * The upload functionality has been re-written, please look at the API documentation referencing $ajax->upload()
    * for more info. For new location of the upload code see cjax/core/file/iframe.php

    going to cjax/core/files/iframe.php I get a google search page not sure where do I find an example.

    So second question is where can I find a working example of how to upload files with ajax.

    Thank you.

  • #148 / May 06, 2013 4:22pm

    bielco

    8 posts

    In the folder I extracted I have:
    application/
    cjax/
    ajax.php
    ajaxfw.php
    examples.html
    htaccess.txt

    So first question is how do I install, I don’t see a controllers folder and I don’t see a testing.php file?

    =================================

    I had indeed the same problem, the install documents are very vague, and they always assume you install your framework in the website root.

    But despite, i always install the framework OUTSIDE the website root.
    Because of that i seem not to get it working.

    So i copied the controller, responds and views to the application, and i copied the cjax folder to the public dir (which is my web-root) and i copied ajax.php and ajaxfw.php to the website root (which is public dir as you know in meanwhile).

    Ofcourse i had to change ajax.php so application and system-folder where pointing to the right path on my server.

    Then i tried to run http://mywebsite.com/ajax.php/test/test

    The result is a nice white screen, with nothing in head and nothing in the body.

    So anybody any idea how i can make this work ?

  • #149 / May 06, 2013 5:42pm

    bielco

    8 posts

    i debugged a bit and it seems that

    $controller = $ajax->input(‘controller’);
    if($controller) {
    new ajax($controller);
    }

    The $controller is empty, hence why it does not load anything.
    What can cause this ?

    Btw i work with mod_rewrite, hence why my

    $config[‘index_page’] = ‘’;

    is this.

  • #150 / May 07, 2013 1:55am

    Ajaxboy

    243 posts

    Look like you are following the wrong directions ( for a different version),

    be sure to follow the correct instructions posted here: https://github.com/EllisLab/CodeIgniter/wiki/Ajax-Framework-For-CodeIgniter

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

ExpressionEngine News!

#eecms, #events, #releases