EllisLab text mark
Advanced Search
     
How to set up Xajax correctly in Codeigniter ?
Posted: 15 April 2012 05:01 AM
Avatar
Joined: 2012-02-10
108 posts

Hello ;
I would like to test Xajax in codeigniter and I see that !!


help Xajax

first when I download xajax.zip the last version there are a lot of folder and may be we need
xajax_core and xajax_js

so at the first , I try to proceed like as tutorial :
I copy xajax_core folder in application -> libraries
after I create js folder and make xajax_js under so : js /xajax_js

I don’t proceed the 6th step about mod_rewrite because this is optional :

so when I test this code :

<?php
        

class Testxajax extends CI_Controller 
{

    
public function __construct() 
    
{
        parent
::__construct();
       
$this->load->library('xajax');
        
$this->xajax->registerFunction(array('test_function',&$this,'test_function'));
        
$this->xajax->processRequest();
    
}

    
     
public function test_function($number)     {
         
         $objResponse
=new xajaxResponse();
         
$objResponse->assign("someElementId""innerHTML""Xajax is working.letts add".($number+3));
         return 
$objResponse;
     
}

    
public function index() 
    
{
        $template[
'xajax_js']$this->xajax->getJavascript(null,'js/xajax.js');
        
$template['content']='<div id="someElementId"></div><input type="button" value="test">';
        
$this->load->view('template/index',$template);
        
    
}


     
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?> 

the xajax.js is xajax.core in js folder and an copy that in js folder in my project
so when I test it i have a message like this :

An Error Was Encountered

Unable to load the requested class: xajax

so when I see this message I try another method :

I copy xajax.inc of xajax.core and rename it xajax.php and make that in system->libraries

but when I try mabe it can load the librarie xajax but another error appears :

A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: libraries/xajax.php

Line Number: 360
A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: libraries/xajax.php

Line Number: 1305
A PHP Error was encountered

Severity: Warning

Message: require(C:\wamp\www\CodeIgniteLien\system\libraries/xajaxPluginManager.inc.php) [function.require]: failed to open stream: No such file or directory

Filename: libraries/xajax.php

Line Number: 257

( ! ) Fatal error: require() [function.require]: Failed opening required ‘C:\wamp\www\CodeIgniteLien\system\libraries/xajaxPluginManager.inc.php’ (include_path=’.;C:\\\\php\\\\pear’) in C:\wamp\www\CodeIgniteLien\system\libraries\xajax.php on line 257

 

did you have an idea ???

and another question : when I dowload xajax what are the files that we must copy and must use because there are a lot of files !!

thanks

 
Posted: 16 April 2012 07:04 AM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6707 posts

I emailed you the files along with the Xajax Pagination, hope it helps.

 Signature 

Certified State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

Skype: insitfx

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 16 April 2012 05:01 PM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2012-02-10
108 posts

Thanks a lot InsiteFX ; I ‘ll see that wink

 
Posted: 18 April 2012 05:29 PM   [ # 3 ]   [ Rating: 0 ]
Joined: 2011-02-15
37 posts

I am trying too to install Xajax. Where I am stuck is with the new version if XAJAX the function getJavascript does not accept parameters. When I run my test application I get an error message Error: the javascript component could not be included. I have xajax_js in the root but I need to prefix with base_url() to complete the path to xajax_js.


Could you send me a working sample as well please and what version of xajax are you using?
Thanks a lot!

 
Posted: 18 April 2012 05:37 PM   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2012-02-10
108 posts

hello;
can you send me your email adress and I send you the folder that I have received

I test the last version !!

 
Posted: 18 April 2012 05:57 PM   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6707 posts

It’s the newest Xajax 0.6 beta1 CI 2.0.+
NOTE: Some of the methods were written by IgnitedCoder and myself. The Xajax is in its own folder under libraries and modified to work with CodeIgniter.

Download:
Xajax test application for Xajax 0.6 beta 1, includes CI Xajax pagination with sample and a login form to show how to use Xajax. There are multiple wait spinners in the assets directory. It’s just a quick app I through together for creating the new Xajax pagination but it works.

apptesting.zip

 Signature 

Certified State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

Skype: insitfx

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View

 
Posted: 19 April 2012 08:36 PM   [ # 6 ]   [ Rating: 0 ]
Joined: 2011-02-15
37 posts

Thank you very much for the zipfile. I will test it right away!

 
Posted: 19 April 2012 08:40 PM   [ # 7 ]   [ Rating: 0 ]
Joined: 2011-02-15
37 posts

I have been working on a test version for XAJAX but something is wrong I can’t figure out. Does any one of you have suggestions how to continue?

Below is the link to my forum post:

http://ellislab.com/forums/viewthread/215523/