Hi Peter,
But the problem is I am getting "edit.phtml" not found if I don't
"die"
the action. Or will this change if I do the setHeader content-type?
I'm not getting into the JSON part of it but that issue just sounds
like you've not disabled the view renderer. Just adding:
...rest of your code...
echo json_encode($a_return);
$this->_helper->viewRenderer->setNoRender();
Should stop ViewRenderer trying to auto render a view script.
http://framework.zend.com/manual/en/
zend.controller.actionhelpers.html#zend.controller.actionhelper.stockhel
pers
Nick