Then, if you can build such thing in one minute I recommend you stick with it as I do that. This is how I do it:
CHtml:: is a great class that allows you to render any form field in your document. You will find that there is a htmlOptions array as one of its parameters right? Ok, then, lets build the function (you will be surprised how easy is to do with Yii) :
CHtml::dropDownList or activeDropDownList -using dropDownList for the sake of the example:
I know CHtml quite well, I knew about HTML options but when I checked the docs for dropdown entries and checkboxes, I didn’t find the “onChange” => "javascript: " thing, as it might be generic and not dd/cb specific.