araskin3i
Posts: 0
Joined: Fri Dec 20, 2013 2:44 pm

How to re-enable a button on my screen programatically

I have a button on my screen. In the properties i set disabled to true. However when I programmatically remove this (using removeAttr) the button remains disabled. When I look in the inspector I can see that the CSS class of this button (as well as the surrounding DIV) are still disabled.

Perhaps this is an Appery function I should be calling?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to re-enable a button on my screen programatically

Hi Alon,

How did you disable the button? Did you untick "Visible"? Then to show a button use this code:preAppery("buttonName").show();/pre

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to re-enable a button on my screen programatically

hi,

I am having exactly the same problem on iOS. Any suggestions? The button remains disabled in iOS, whereas the same code works fine (the button is enabled) on Android.

Thanks,
M&M

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to re-enable a button on my screen programatically

Hello!

Could you clarify what code do you use to enable button?

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to re-enable a button on my screen programatically

hi,

I changed my code

To DISABLE Button
Old Way:
$("[dsid='myButton']").addClass('ui-disabled');

Changed To:
Appery('myButton').attr('disabled', 'disabled');

To ENABLE Button
Old Way:
$("[dsid='myButton']").removeClass('ui-disabled');

Changed To:
Appery('myButton').attr('disabled', null);

Seems to work. Any problem then I'll get back.

Thanks,
M&M

Return to “Issues”