Christine Stringfield
Posts: 0
Joined: Wed Apr 03, 2013 4:35 am

Select Radio Button in Javascript

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;

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Select Radio Button in Javascript

Hi Christine!

We'll update as soon as possible.

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

Select Radio Button in Javascript

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

Christine Stringfield
Posts: 0
Joined: Wed Apr 03, 2013 4:35 am

Select Radio Button in Javascript

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

Return to “Issues”