CGridView CbutonColumn Custom Button Click not working

I am using a CGridView in which I have a CButtonColumn for which I have defined a button. the “click” js is not being called. The URL is called though and completes. I want to show a confirmation to the user but it never shows up. According to the documentation ‘click’ is a JS function to be called upon click but it is not working for me.

$this->widget('zii.widgets.grid.CGridView', array(















						'click'=>'function(){alert("Are you sure?");}',


						'url'=>'Yii::app()->createUrl("favs/reset", array("id"=>$data->id))',						












may be try this javascript

if (confirm("Are you sure?")) {


No still nothing. The click is not being called.


See this link