I'm trying to write privilige group checkbox. Something like this
So far I made page where I put empty control made by me which looks like this
<fieldset>
<legend><asp:CheckBox ID="GroupName" runat="server" TextAlign="Left" text="test" onclick="checkAll()"/></legend>
<span> <!--class="filterTableSpan"-->
<asp:Table ID="priviligeTable" runat="server" CssClass="groupTable">
</asp:Table>
</span>
</fieldset>
then I fill priviligeTable
CheckBox privilCheck = new CheckBox();
privilCheck.ID = this.ID + "_" + privName; //ID of group
TableCell tc = new TableCell();
tc.ID = this.ID + "_tc" + privName;
tc.Controls.Add(privilCheck);
TableRow tr = new TableRow();
tr.ID = this.ID + "_tr" + privName;
tr.Cells.Add(tc);
this.priviligeTable.Rows.Add(tr);
and now I'd like to make javascript for select all, unselect and mid state to Privilige Group Name checkbox, but I do not know how to access dynamic generated checkboxes. Furthermore I'm a newbie with javascript. I would be pleased if someone could show me a way to solve this problem or rather a direction which I should head to solve by my efforts this problem.