hello everyone
-
hello everyone, I have a small doubt regarding the CheckBoxList.I want to capture the ID of the checkboxlist items using the javascript.Can anybody help me in writing the code.Thankx in advance. ok byeeeeee Murali
-
hello everyone, I have a small doubt regarding the CheckBoxList.I want to capture the ID of the checkboxlist items using the javascript.Can anybody help me in writing the code.Thankx in advance. ok byeeeeee Murali
CheckBoxList will be rendered as several HTML input checkbox. View source the page and find checkbox names. It will be generated in sequential way. You can loop through it and get the objects.
-
hello everyone, I have a small doubt regarding the CheckBoxList.I want to capture the ID of the checkboxlist items using the javascript.Can anybody help me in writing the code.Thankx in advance. ok byeeeeee Murali
I had written a example for you :
function Test(objSource) { for(var i = 0;i< objSource.childNodes.length;i++) { var obj = objSource.childNodes[i]; if(obj.tagName != null && obj.tagName.toLowerCase() == "input" && obj.type.toLowerCase() == "checkbox") { alert(obj.id); } else { Test(obj); } } } //begin get ids of CheckBoxList function GetIDs() { var objSource = document.getElementById("CheckBoxList1"); Test(objSource); }
-- modified at 8:34 Monday 13th August, 2007 learning english