Hi,
I'm using AJAX in my application and i want to send JSON object, with these
params
{
'html': someHTMLcode
'valid':true/false
}
The html code i'm rendering from view script.
here is my code.
$this->view->callResponseForm = $callResponseForm;
$this->render('result-form'); // render to response object
$this->getResponse()->setBody(
Zend_Json::encode(array('html'=>$this->getResponse()->getBody(),'valid'=>0))
);
I'm not sure that these the right way how to do it' have got some tips how
do it in better way?
Thanks
--
View this message in context:
http://www.nabble.com/Sending-JSON-the-best-practice--tp19157013p19157013.html
Sent from the Zend Framework mailing list archive at Nabble.com.