yii menu with onclick link


yii menu :
 array('label'=>'Create Invoice', 'url'=>'', 'linkOptions'=>array('onclick'=>'{printInvoice();}', 'style'=>'cursor: pointer; text-decoration: none;',)),  

the html result :

 <a href="#" onclick="{printInvoice();}">Create Invoice</a>  

then create the js function :

 <script>  
 function printInvoice(){  
   ..do something here…  
 }  
 </script>  

Comments

Popular posts from this blog

Data Flow Diagram (DFD)

allow only numeric (0-9) in html inputbox using jquery