Please see this: http://gisdev.clemson.edu/fireflies
Toward the top right are three checkboxes and I am trying to make them work like radio buttons. Part of the prog
The essential problem here is that you need to group a set of boxes and then if any one of the set is clicked, iterate through the set, unchecking all except the one that was clicked.
You can group using a class name. Then give each an id.
When the class is clicked, save the id of the clicked one. Then iterate through the checkboxes within the class and uncheck any that have a different id than the one you saved off.
var selectedBox = null;
$(document).ready(function() {
$(".CB2RBVehicles").click(function() {
selectedBox = this.id;
$(".CB2RBVehicles").each(function() {
if ( this.id == selectedBox )
{
this.checked = true;
}
else
{
this.checked = false;
};
});
});
});
Here's an example.