Disable the click on a CJuiButton

Good morning.

I wonder how to disable the click on a CJuiButton. Below is the structure of my button:




<?php

    $this->widget('zii.widgets.jui.CJuiButton', array(

        buttonType' => 'button',

        'name' => 'btnClickCliente',

        'htmlOptions' => array('style' => 'width: 30px; height:25px; vertical-align:middle; background:url("' . Yii::app()->request->baseUrl . '/images/btnSearch.png' . '") no-repeat scroll 100% transparent;'),

        'onclick' => 'js:function(){$("#dlgCliente").dialog("open");return false;}',

    ));

?>



Thank you.

I’m not sure if I’m fully understanding, but you could disable the button using jQuery:




$('#buttonId').attr('disabled', 'disabled');



And to re-enable it:




$('#buttonId').removeAttr('disabled');