[eluser]Jagar[/eluser]
This is how mine is:
[system]
[application]
[libraries]
[xajax]
[plugin_layer]
legacy.php
xajax.php
...
...
Code:
class Test extends Controller {
function Test(){
parent::Controller();
}
function index(){
$this->load->library('xajax/xajax');
$this->xajax->registerFunction(array($this,"test_xajax"));
$data['xajax_script'] = $this->xajax->getJavascript("/scripts");
$this->xajax->processRequest();
$this->load->view("view_name",$data);
}
function test_xajax(){
$objR = new xajaxResponse();
$objR->assign('feedback','innerHTML','Hello from xajax');
return $objR;
}
}
Please let me know if that works, the only reason you are getting that redeclared is because you may have it defined somewhere else, make sure you haven't done any includes anywhere in your controller. The only way you will get it to load is through $this->load->library('xajax/xajax');