Aren't check (tick) buttons more useful?
Why do they exist?
They seem quite unnecessary to me, can you please explain to me the purpose of radio buttons?
Aren't check (tick) buttons more useful?
Why do they exist?
They seem quite unnecessary to me, can you please explain to me the purpose of radio buttons?
They are used so that only one option can be chosen out of a group of options. Check buttons allow the user to choose multiple options.
If the goal is to have check boxes for which only 0 or 1 of the boxes in a group is checked, then check out the jsFiddle from this answer. It presents a simple way to do this using jQuery.
Here's the Javascript code used:
$("input:checkbox").click(function() {
if ($(this).attr("checked") === true) {
var group = "input:checkbox[name='" + $(this).attr("name") + "']";
$(group).attr("checked", false);
$(this).attr("checked", true);
} else {
$(this).attr("checked", false);
}
});
Checkboxes are for multiple selection while radio buttons only allow a single selection. It is really by design of HTML and before that standard user interfaces that checkboxes and radio buttons behave this way.
Radio buttons derive their name from the design of the station presets on a radio (think car dash radio). Back before radios were all digital, those radio buttons physically pushed in causing the single selection to push the existing selection out.