Here is the sample java script code to demonstrate that how can we validate a checkbox list inside the aspx page.
function a()
{
var tableBody = document.getElementById('CheckBoxList1').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)
{
listControl.checked = false;
}
return false;
}
{
var tableBody = document.getElementById('CheckBoxList1').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)
{
listControl.checked = false;
}
return false;
}
Happy Coding!!!!!!
ThanksAnil Kumar PandeySystem ArchitectGreen Point Technology (India) Ltd.Mumbai, Maharshtra
No comments:
Post a Comment