John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to activate a button by a checkbox?

Hi, i have checkbox that must be checked in order to click a certain button (in this case its the 'Sign Up' button), so im assuming that i make that button un-visible, then Im thinking i need to run some kind of JS on the checkbox to activate/make visible that button, if so, what would would the JS code look like in this case:

Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

how to activate a button by a checkbox?

Hi,

Add JS to checkbox click event. Replace component names on JS code.

code
var v = $('input', Appery("mobilecheckbox_14")).prop("checked");
if (v)
{
Appery('mobilebutton_6').show();
}
else Appery('mobilebutton_6').hide();
/code

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to activate a button by a checkbox?

Hi, I just tested this code and does not work. Its strange because if you switch 'show' and 'hide' it will make the button visible (only on Firefox, not doing anything on my iPhone), but the buttons real colors are not showing...

So, how do we get this to work?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

how to activate a button by a checkbox?

Hello,

Please clarify did you test on IPhone browser or you install .ipa file?

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to activate a button by a checkbox?

yes i tested on the iphone it does nothing.

In firefox if you switch 'show' and 'hide' it will make the button visible (only on Firefox, not doing anything on my iPhone), but the buttons real colors are not showing...

Therefore, 2 problems:
1) On firefox the buttons original colors are not coming in (and thats only when I switch 'show' and 'hide'); and
2) On iPhone, it doesnt work at all.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

how to activate a button by a checkbox?

We'll check and let you know.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to activate a button by a checkbox?

i tried it on the Android phone, and with the Android i get even more strange results. Basically, at first it worked like I described for the firefox browser (in my previous posting), then it didnt work at all anymore.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

how to activate a button by a checkbox?

What is Android version on your device?

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to activate a button by a checkbox?

the version i have is 2.3.4

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

how to activate a button by a checkbox?

I have tested on 2.3.6, all works fine.
Please make you App public and send a link to us.

Return to “Issues”