Mam do menu głównego podpięte jquery, gdy klikam na element menu wywoluję następującą funkcję :
$("li").click(function(){ var ul = $(this).parent(); var children = ul.children(); var self = this; children.each(function(index, elem){ if(self == this){ $(elem).find('a').text(); $(this).unbind('mouseout'); $('#leftcolumn').load(App.baseUrl+'/default/index/'+$(elem).find('a').text()+'/format/html'); <<---------- } else if($(elem).height() == 150){ $(this).bind('mouseout', [], function(){$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'})}); $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'}) } }) $(this).unbind('mouseout'); });
Najważniejsza jest linijka zaznaczona strzałką
Następnie mam sobie kontroller który wygląda następująco :
class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('about', 'html') ->addActionContext('projects', 'html') ->initContext(); } public function indexAction() { // action body } public function aboutAction(){ // pretend this is a sophisticated database query $this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout->disableLayout(true); //throw new Exception('var_export($data)'); $this->view->data = $data; } }
Następnie widok, bardzo prosty testowy "about.ajax.phtml":
Request na serwer idzie prawidłowo, ale niestety w odpowiedzi nic nie dostaję, kombinowałem na różne sposoby
Może jakieś pomysły ?