Button click

Hi guys! Im new to yii and php and I dont understand how could I do some actions when I`m click on the button.

I thought there`s something like C-like languages have onclick event listeners…

For my task I need to upload a picture to the web page. Please guys, what am I better yo use? CHtml::button and image ir CJuiDialog?

                                                                                  Thank you!

search for ‘uploadify’

Options on a html button

echo CHtml::button(‘Delete’,

                    array('submit' => array('user/delete','id'=>$model->usId),


                        'confirm'=>'Are you sure you want to delete?',

                        'class'=>'btn btn-large btn-danger',