class someAppAjaxActions extends waJsonActions
{
...
function testAction()
{
...
$this->response = array(
'valA' => 'value first',
'valB' => 'velue second',
);
}
}
$.getJSON('?module=ajax&action=test', function (json) {
alert(json.data.valA);
});
return array(
'ajax/' => 'ajax',
)