469,569 Members | 1,577 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,569 developers. It's quick & easy.

Get the value of selected checkbox of tree view control through javascript

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 UnCheckAllCheckBoxes()
{
//debugger
var ControlToUncheck = document.getElementById('ctl00_List_CtrlRisk1_Tree ViewControl1_TreeView1');

var tables = ControlToUncheck.getElementsByTagName("TABLE");

var iLoop;
var iCount=0;

for(iLoop = 0; iLoop < tables.length; iLoop++)
{
var check = tables[iLoop].getElementsByTagName("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 );
}
Feb 14 '08 #1
0 2000

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Sarah West | last post: by
6 posts views Thread by Kurt Mang | last post: by
3 posts views Thread by Marc Castrechini | last post: by
10 posts views Thread by dwok | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.