ajax in zend frame work
        Posted  
        
            by rookie
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by rookie
        
        
        
        Published on 2010-04-29T19:01:29Z
        Indexed on 
            2010/04/30
            6:17 UTC
        
        
        Read the original article
        Hit count: 575
        
Hi, I am new to Zend Frame Work. I am using $ajaxContext = $this->_helper->getHelper('AjaxContext'); for adding action contexts. I have one Index.phtml page and all other views are ajax.phtml pages. I have to do some java script methods in the ajax.phtml pages. But i didn't find a way to refer the js files in the ajax.phtml pages. I have tried adding those in the controller init and index action, using $this->view->headScript()->appendFile, though i have the reference added in the page source, none of htese seems to be working on the ajax content. Then i tried to add it in the action for the ajax page, then it is not coming in the page source itself. As far as i understood, $this->view->headScript()->appendFile will append the file reference to the layout page and for the ajax.phtml pages, the layout will be disabled. Is there any way that i can refer my js files in the ajax.phtml pages?
© Stack Overflow or respective owner