Zend Ajax Return


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. class IndexController extends Zend_Controller_Action
  4. {
  5. private $params;
  6.  
  7. public function init(){
  8. $this->params = $this->getRequest()->getParams();
  9. }
  10.  
  11. public function indexAction(){}
  12.  
  13. public function dosomethingAction(){
  14. $this->_helper->json(array('success'=>true,'val'=>$this->params['givemethis']));
  15. }
  16.  
  17.  
  18. }
  19.  
  20. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.