title: How to call a javascript function from zend controller indexAction?
body: <p>i want to call a javascript function from zend controller indexAction. my controller is look like this..</p>
  
  <p>// mycontroller.php</p>
  
  <pre><code>      public function indexAction(){
           $role = 'admin';
           $id = 23;
        // here i want to call the javascript function 
         /// like myjsfun(role, id);
         }
  </code></pre>
  
  <p>and viwefile for the controller is 
         //index.phtml</p>
  
  <pre><code>    here is my javascript function
  
     &lt;script type='text/javascript'&gt;
  
     function myjsfun(role, id){
      // code for this function
       }
  </code></pre>