posted 15 years ago
(New to this stuff) I have three possibilities of selection using checkboxes, Select All Active, Select All Inactive, and individual checkbox selection. I have basic 'Select All' checkbox logic working, but without the additional criteria of 'Active' or 'Inactive'. Can someone help me to only select Active or !Active status_ind values for the checkboxes? Thanks in advance!
Select All logic:
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;
}
checkflag = "true";
return "Uncheck All";
}
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false;
}
checkflag = "false";
return "Check All";
}
}
triggered by:
<input name="sa_active2" type="checkbox" id="sa_active2" value="checkbox" onKlick="this.value=check(this.form.selectBox)">Select All Active/>
The code for showing the list is:
<logic:iterate id="element" name="subgroupList" indexId="cCount">
<nested:root name="element">
<crmcustom:alttr indexName="cCount" bgcolor1="#ffffff" bgcolor2="#e7e7e7"/>
<td class="col1"><nested:checkbox property="selectBox" disabled="false"/></td>
<td class="col2" width="140px"><nested:write property="subgroup_no"/></td>
<td class="col3" width="140px"><nested:write property="status_ind"/></td>
</nested:root>
</tr>
</logic:iterate>