By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 769 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

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

P: 70

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()
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(iCount );
Feb 14 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

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