Page 1 of 1

Select Radio Button in Javascript

Posted: Tue Apr 23, 2013 4:28 am
by Christine Stringfield

I have a radio button called "Unclaimed" that I would like to have selected if a certain condition is true.

What is the proper JavaScript syntax to use for this?

I tried:

Appery('Unclaimed').attr('checked', 'checked');
Appery('Unclaimed').selected() = true;


Select Radio Button in Javascript

Posted: Tue Apr 23, 2013 4:40 am
by Alena Prykhodko

Hi Christine!

We'll update as soon as possible.


Select Radio Button in Javascript

Posted: Tue Apr 23, 2013 6:18 am
by Maryna Brodina

Hello! Try the following JS:

codeAppery("Unclaimed").find("input[type=radio]").prop("checked", true); //select radiobutton with name "Unclaimed"
$('input[name=mobileradiogroupName]').each(function(){$(this).checkboxradio("refresh")}); // refresh all radio buttons in group/code

Unclaimed - radio button that you want to have selected
mobileradiogroupName - radiogroup name


Select Radio Button in Javascript

Posted: Tue Apr 23, 2013 5:28 pm
by Christine Stringfield

Ok, that's definitely not as simple as I thought it would be. :) That did work...thank you!