' You could also build the function as follows: ' it declares an array to store a list of which boxes are checked ' it loops through the checkboxes and adds the index of each checked box to the new array ' the new array's length property is used as the index of each new entry, ensuring that they are added to the end of the array ' finally, a custom output message is build, depending on how many boxes are checked
function whichIsIt(frm)
{
var chkBx = new Array(); // define array to hold reference to checked boxes
// determine which checkboxes are checked and store their number in the array
for(i=0; i<frm.check.length; i++)
{
if(frm.check[i].checked==true)
{
chkBx[chkBx.length] = i;
}
}