Blog Detail

Checkbox list validation using javascript

11 Aug 10
admin
one comments
function readListControl()
{
var tableBody = document.getElementById(‘<%=Checkboxlist_id%>’).childNodes[0];

for (var i=0;i < tableBody.childNodes.length; i++)
{
var currentTd = tableBody.childNodes[i].childNodes[0];
var listControl = currentTd.childNodes[0];

if (listControl.checked == true)
{
return true;
}
}
alert(“Please select any item!”);
return false;

}

1 Comment

  1. Richard Byrdk June 3, 2013 at 1:49 pm Reply

    This comment has been removed by the author.

Leave A Comment