[eluser]mistress_shiira[/eluser]
well,try to do this:
1. unzip your codeingniter folder to the directory that you want
2. also unzip the folder containing your xajax files
3. copy xajax_core files and put it in system/application/libraries
then also copy xajax_js and put it somewhere convenient for you( i put it in the top level of my system)
4. in the system/application directory create a folder called init
and within that folder create init_xajax.php
Quote:<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
if ( ! class_exists('xajax'))
{
require_once(APPPATH.'libraries/xajax'.EXT);
}
$obj =& get_instance();
$obj->xajax = new xajax();
$obj->ci_is_loaded[] = 'xajax';
?>
5. to check if its working try this simple exercise:
Quote:<?php
class testxajax extends controller {
function index() {
function test_function($number) {
$objResponse = new xajaxResponse();
$objResponse->assign("hello","value", "Xajax is working. Lets add: ".($number+3));
return $objResponse;
}
$this->load->library('xajax');
$this->xajax->registerFunction("test_function");
$this->xajax->processRequest();
$template['xajax_js'] = $this->xajax->getjavascript('../../');
$template['content'] = '<div id="SomeElementId"></div><input type="button" value="test" onclick="xajax_test_function(2);">';
$this->load->view('template', $template);
}
}
?>
Note: the function getJavascript has a parameter which you will point to where your xajax_js folder is located
hope that helps