Page 1 of 1

trying to get radio button value and reference it in a JS file.

Posted: Wed May 14, 2014 12:50 pm
by Brian Irr

I have created a Js file to calculate tipping. I have also used a html file to create the User interface. It works fine on desktop.
I am now trying to use the radio buttons in appery and I am having troble getting the value of the selected button and then supplieing it to the JS file.

I have also shared the file with you. The apps name is Geo. note I do have multiple pages but you can ignor the others I use this app to develop ideas.


trying to get radio button value and reference it in a JS file.

Posted: Wed May 14, 2014 1:43 pm
by Kateryna Grynko

Hi Brian,

Try this code please:pre//getting the value of radio button
var chosen = $('input:radio[name=mobileradiogroup1]:checked').val(); /pre


trying to get radio button value and reference it in a JS file.

Posted: Wed May 14, 2014 1:47 pm
by Brian Irr

Should I change the code to read name=mobileradiogroup_24
since that is the one I am using?

and
should I run the code on the mobileradiogroup_24


trying to get radio button value and reference it in a JS file.

Posted: Wed May 14, 2014 2:04 pm
by Kateryna Grynko

Brian,

This is a sample name, just replace it with yours.