[eluser]Unknown[/eluser]
Hi,
I facing problem in fetching a smarty tpl in xajax function
class User extends controller{
function index1() {
function test_function($data) {
$objResponse = new xajaxResponse();
//$objResponse->addAlert(print_r($data,true)
;
$this->mysmarty->assign('cc',"hello");
$content= $this->mysmarty->fetch('list.tpl');
$objResponse->addAssign("content","innerHTML", $content);
return $objResponse->getXML();
}
$this->load->library('xajax');
$this->xajax->registerFunction("test_function");
$this->xajax->processRequests();
$template['xajax_js'] = $this->xajax->getjavascript(null, '/js/xajax.js');
$this->mysmarty->assign('xajax_js',$template['xajax_js']);
$this->mysmarty->display("index.tpl");
}
}
It's giving error:-
FATAL ERROR:- Using $this when not in object content in line 20
kindly give solution , how can i fetch the other tpl, i have also tried to make object of the class
$user= new User;
using $user at place of $this;
still not working...............
thanks