I have an asp.net page that has one radiolist (called lstcheck) and one checkboxlist (call lstExchange). Depending on the which radiolist item is checked, I need to clear the checkbox list or check them all. I have this function so far but it is not working:
I add this line to pageload event on the vb side:
lstCheck.Attrib utes.Add("OnCli ck", "checkAll() ;")
Code:
function checkAll()
{
var radiolist=document.getElementById("lstCheck");
var checklist=document.getElementById("lstExchange");
if (radiolist[3].checked=true)
{
for (var j=0; j<checklist.lenght; j++)
{
checklist[j].checked=true;
}
}
}
lstCheck.Attrib utes.Add("OnCli ck", "checkAll() ;")
Comment