javaScript select/unselect items of CheckBoxList

prav_roy

Well-known member
Joined
Sep 10, 2005
Messages
70
Location
Mumbai
Programming Experience
1-3
hi all,
i have some problem in client side scripting.. i have on checkbox..depending on the status of this checkbox i want to select/unselect items of CheckBoxList..
My CheckBoxList is Binded to a SQLDataReader.

My JavaScript looks something like this..
HTML:
function SelectChannelCheck(){
for(i = 0; i < document.form1.ChannelGenreList.length; i++){ //Doesnt work
if (document.form1.AllChannels.checked){
document.form1.ChannelGenreList[i].checked = true; //Doesnt work
}else{
document.form1.ChannelGenreList[i].checked = false; //Doesnt work
}
}
}
 
Last edited by a moderator:
Back
Top