Hi,
Here's is a solution using customvalidator, not entirely javascript solution, but maybe it could be used:
http://www.4guysfromrolla.com/webtech/tips/t040302-1.shtml[
^]
Or
Together with a custom validator and a small piece of javscript as code below:
function validate(source, arguments) {
arguments.IsValid = false;
var checklist = document.getElementById("MyCheckBoxList");
if (checklist == null) return;
var elements = checklist.getElementsByTagName("INPUT");
if (elements == null) return;
var checkBoxCount = 0;
for (i = 0; i < elements.length; i++) {
if (elements[i].checked) checkBoxCount++;
}
arguments.IsValid = (checkBoxCount > 0);
}
<asp:CustomValidator ID="CustomValidator1" runat="server"
ClientValidationFunction="validate" ErrorMessage="One of the checkboxes needs to be checked!"
ValidationGroup=""></asp:CustomValidator>
Regards
Joachim