disable a ckeckbox when press a button

Hi everyone, I have this problem:

In this picture I have one checkbox and one button:

my idea is that the to press the button, the checkbox will disabled like this:

How can do it?

Thanks!

(sorry for my english :P)

Hello,
What you can do is treat with a Boolean variable.
You put it in the Enabled of your CheckBox, and when you click the button, you change the value of it, and it gives an Ajax Refresh in your CheckBox.

Hi,


On button click refresh the checkbox container and set Boolean variable of enabled property and set false when u click on button.


Thanks.

Hi Paulo Nicolas Jara Fuentes,

As Bernardo Condé said you can create a Boolean variable IsEnable, set default value to be true and set it to the enable property of the check box, then assign a value for IsEnable variable to be false in onclick action of button.


Pratham wrote:

Hi Paulo Nicolas Jara Fuentes,

As Bernardo Condé said you can create a Boolean variable IsEnable, set default value to be true and set it to the enable property of the check box, then assign a value for IsEnable variable to be false in onclick action of button.


In this example you will always uncheck the checkbox though.


To clarify, use a seperate variable for the Enabled field than the one you are using in your variable field.


The problem was solved with theirs suggestions.

Thanks!