Page 1 of 2

how to activate a button by a checkbox?

Posted: Mon Jun 03, 2013 1:45 am
by John Herdean

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


how to activate a button by a checkbox?

Posted: Mon Jun 03, 2013 3:05 am
by Igor

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


how to activate a button by a checkbox?

Posted: Wed Jun 26, 2013 9:36 pm
by John Herdean

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?


how to activate a button by a checkbox?

Posted: Wed Jun 26, 2013 10:10 pm
by Igor

Hello,

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


how to activate a button by a checkbox?

Posted: Wed Jun 26, 2013 11:19 pm
by John Herdean

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.


how to activate a button by a checkbox?

Posted: Wed Jun 26, 2013 11:26 pm
by Igor

We'll check and let you know.


how to activate a button by a checkbox?

Posted: Thu Jun 27, 2013 12:02 am
by John Herdean

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.


how to activate a button by a checkbox?

Posted: Thu Jun 27, 2013 12:16 am
by Igor

What is Android version on your device?


how to activate a button by a checkbox?

Posted: Thu Jun 27, 2013 12:24 am
by John Herdean

the version i have is 2.3.4


how to activate a button by a checkbox?

Posted: Thu Jun 27, 2013 12:28 am
by Igor

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