0

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

1
  • Show us what you have tried at least. Commented Jul 1, 2015 at 6:39

1 Answer 1

1

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"]')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.