Pages

Thursday, August 13, 2009

Java Script Validation for Check box list

hi,

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;
}


Happy Coding!!!!!!


Thanks
Anil Kumar Pandey
System Architect
Green Point Technology (India) Ltd.
Mumbai, Maharshtra

No comments:

Post a Comment

Kontera