Hi,
I have a treeview control which have checkbox control. I just need to fetch the selected checkbox value (id of selected node of tree view).
I have used following code to get the no. of selected checkbox of tree view control....
function UnCheckAllCheck Boxes()
{
//debugger
var ControlToUnchec k = document.getEle mentById('ctl00 _List_CtrlRisk1 _TreeViewContro l1_TreeView1');
var tables = ControlToUnchec k.getElementsBy TagName("TABLE" );
var iLoop;
var iCount=0;
for(iLoop = 0; iLoop < tables.length; iLoop++)
{
var check = tables[iLoop].getElementsByT agName("INPUT") ;
var i;
for(i = 0; i < check.length; i++)
{
if(check[i].type = "checkbox")
{
if(check[i].checked == true)
{
//alert(check[i].value);
iCount++;
}
}
}
}
alert(iCount );
}
I have a treeview control which have checkbox control. I just need to fetch the selected checkbox value (id of selected node of tree view).
I have used following code to get the no. of selected checkbox of tree view control....
function UnCheckAllCheck Boxes()
{
//debugger
var ControlToUnchec k = document.getEle mentById('ctl00 _List_CtrlRisk1 _TreeViewContro l1_TreeView1');
var tables = ControlToUnchec k.getElementsBy TagName("TABLE" );
var iLoop;
var iCount=0;
for(iLoop = 0; iLoop < tables.length; iLoop++)
{
var check = tables[iLoop].getElementsByT agName("INPUT") ;
var i;
for(i = 0; i < check.length; i++)
{
if(check[i].type = "checkbox")
{
if(check[i].checked == true)
{
//alert(check[i].value);
iCount++;
}
}
}
}
alert(iCount );
}