Reputation: 3
i want to disable update button dan make it invisible using jQuery when update page is open, but if the value of payed is 1. i can get the value from database somebody please help me, i'm a newbie in yii. thank you
Upvotes: 0
Views: 125
Reputation: 4560
Add this code to your view file:
<?php Yii::app()->clientScript->registerScript(
'disable-button',
'$('input[type="submit"]').attr('disabled','disabled');',
CClientScript::POS_READY
) ?>
But change jQuery selector on yours:
$('input[type="submit"]')
Upvotes: 1