• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Select only checkboxes matching criteria

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(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>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic