asprin
Guest
Member
I've an onchange event handler defined which makes an AJAX call
JavaScript:
Code:
This is the controller method
PHP:
Code:
Read more
Continue reading...
JavaScript:
Code:
Code:
// url points to myController/my-method
XF.ajax('GET', url, {'tid':2, 'eid':1}, function (data){
console.log(data);
});
PHP:
Code:
Code:
public function actionMyMethod()
{
$this->setResponseType('json');
$tid = $this->filter('tid', 'int');
$eid = $this->filter('eid', 'int');
$viewParams = [
't' => $tid,
'e' => $eid
];
return...
Continue reading...