Hi,
In my ASP.NET page I have a TreeView where ShowCheckBoxes="Leaf".
I want to mark as checked/unchecked all the visible checkboxes by clicking in a button.
My code for selecting all/none nodes is like this:
function selectAllNone(tvID, value) {
var tvNodes = document.getElementById(tvID);
var chBoxes = tvNodes.getElementByTagName("input");
for (var i = 0; i < chBoxes.length; i++) {
var chk = chkBox[i];
if (chk.type == "checkbox") {
chk.cheked = value;
}
}
}
However, in the line var chBoxes = tvNodes.getElementByTagName("input");I'm having this error message: object doesn't support this property or method.
How do I checj/uncheck all the checkboxes, then?
Thanks,
Ana