I am trying to create a Yii widget that will generate Google Cha开发者_运维技巧rts (http://code.google.com/apis/chart).
How do I make a widget that writes code in both the html headers (where the javascript includes and stuff will be), and in the html body?
I found my answer:
Yii::app()->clientScript->registerScriptFile()
and
Yii::app()->clientScript->registerScript()
精彩评论