well, you can do this in two ways:
1. (Not a good one) ids for checkboxes in checkboxlists are created like
this:
"nameOfAcheckboxlist_nextNumber"
so you can loop
for (i = 0; i < number; i++)
{
if (document.getElementByID("checkboxlistName_" + i ).checked)
{
//do something
}
}
or
2. (Better one) On server side create a javascript array that contains
checkbox'es .ClientID
And on a client side loop through this array.
for (i = 0; i < idsArray.length; i++)
{
if (document.getElementByID(idsArray
).checked)
{
//do something
}
}
hope this helps.
Satheesh Babu B said:
hai..
am having a checkboxlist..now how do i get the value of the checkbox
that is checked in checkboxlist using javascript?
Thanks in advance....
Regards,
Satheesh