It is very common to see if a checkbox has been checked or not before a form being sent out to server. This can be done by the following javascript code
<script language="JavaScript">
function verify_checkbox(checkbox)
{
var isChecked = false;
if checkbox[0]) { /* chackbox group/array */
for(var j=0; j<checkbox.length; j++){
if(checkbox[j].checked){
alert("The checkbox #"+(j+1)+"has been checked.");
isChecked = true;
}
}
}else{
if(checkbox.checked){
alert("The checkbox has been checked.");
isChecked = true;
}
}
if(!isChecked)
alert("No checkbox has been checked.");
}
</script>