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