Hi,
I need a version in javascript for *checkBoxList.Items(x).Text* to
check if the item x ends with an specific word (given as parameter in
the function) and, if so, check the item.
What I'm trying to do is a kind of Select All/None, but in this case I
have to select only the items that ends with an specific word.
Currently my function is like this:
function checkSpecific(cbl, text) {
var chkBoxList = document.getElementById(cbl);
var chkBoxCount = chkBoxList.getElementsByTagName
("input");
for (i = 0; i < chkBoxCount.length; i++) {
var currentItem = chkBoxCount[i]
var expectedIndex = currentItem.count - text.length
if (currentItem.lastIndexOf(text) == expectedIndex) {
chkBoxCount[i].checked = true;
}
}
}
Any ideas about how I can do it?
Thanks in advance,
Ana