xman
Posts: 0
Joined: Sun Jul 06, 2014 7:05 pm

How can I uncheck a Radiobutton?

I've tried several options listed in the forum, but unchecking the radio button does not work for me. What I want is that, the next click on a checked ratio button should uncheck it.

I have JS on "click" event on the radio button, which does the following:

if (Appery("radiobutton").is(':checked')) {
alert("found button is checked, will uncheck it now");
Appery("radiobutton").removeAttr('checked');
} else {
alert("found button is Un-checked, will check it now");
Appery("radiobutton").attr('checked', 'checked');
}

Once checked, the radio button never gets unchecked. Alert's do print out the correct expected values, so the check in the if statement is working.
-
-

Return to “Issues”