C
cindy
I have an asp:checkboxlist
I have javascript that onpostback will create a string from checkboxlist
item values where item is checked.
I need help, I can get the index of item but I can't get the value. Alert
fires the correct index for the item that is checked.
???????? What is the syntax for the item value??
var tableBody = document.getElementById(checkboxlistID).childNodes[0];
for (var i=0;i<tableBody.childNodes.length; i++)
{
var currentTd = tableBody.childNodes.childNodes[0];
var listControl = currentTd.childNodes[0];
if ( listControl.checked == true )
alert('#' + i + ': is checked');
}
I am using version 1.1 .NET
I have javascript that onpostback will create a string from checkboxlist
item values where item is checked.
I need help, I can get the index of item but I can't get the value. Alert
fires the correct index for the item that is checked.
???????? What is the syntax for the item value??
var tableBody = document.getElementById(checkboxlistID).childNodes[0];
for (var i=0;i<tableBody.childNodes.length; i++)
{
var currentTd = tableBody.childNodes.childNodes[0];
var listControl = currentTd.childNodes[0];
if ( listControl.checked == true )
alert('#' + i + ': is checked');
}
I am using version 1.1 .NET