I have spent many hours on this problem, and can't seem to crack it. How can a checkbox in an array of checkboxes know which index is its home? The checkbox can pass up its corresponding form object, and the array of checkboxes, but how can an onKlick() function for a specific checkbox know that this checkbox is the 7th in a list of 12? The final number of checkboxes is not known ahead of time.
The user first selects from a multiple-select list; the multiple-select specifies the "names" in a set of name-value pairs, and the subsequent checkboxes and textfield specifies the range of values for each name. For each name there are two sets of properties to specify.
My first iteration of this did not permit the user to select a list of names, it only allowed one name. The additional properties were specified with radio buttons.
I can generate the checkboxes ok using c:forEach
jsp tags, but I need to a way to make them act like sets of radio buttons. For each dynamically selected name, I have two groups of CB's ("groupA", "groupB") For each name, I want the user to pick one (and only one) from groupA and one and only one from groupB.
The web gave a few tantalizing hints:
http://javascript.internet.com/forms/select-one.html http://javascript.internet.com/forms/limit-boxes.html http://javascript.internet.com/forms/controlled-boxes.html