Dear Sir,
Hello ! Well I am calling ajax request from my javascript function which in turn is called from dojo.combobox onChange event. I want to return Json output to this javascript from my action. It works well on hard coded array $arr but does not work with $data which has actual dynamic table data.
public function gettaskAction()
{
$taskhead = new Taskhead();
$data= $taskhead->fetchAll();
$arr = array (identifier=>'name',
items=>array(
array('name'=>'Bidding', 'label'=>'Bidding'),
array('name'=>'Response-proposal ', 'label'=>'Response-proposal')
)
);
$this->_helper->json($data, array('enableJsonExprFinder' => true));
}
If I put above $arr in place of $data in json call, it works well and populate my comboxbox but putting $data it does not work, might be not proper json format is converted.
Please guide me on this.
Thanks in Advance !
Naimesh
没有评论:
发表评论