On my form I have checkbox1, checkbox2, checkbox3, textbox1 and textbox2.
By default only checkbox1 is active. When I click(check) checkbox1, checkbox2 is activated. When I click(check) checkbox2, checkbox3 is activated. Finally when I check checkbox3, textbox1 and textbox2 are activated.
And when I uncheck checkbox3, both textboxes are disabled. Checkbox2 with uncheck state disables checkbox3.
How can I maintain dependencies between these objects? For example, when I uncheck checkbox1, checkboxes 2 and 3 and both textboxes should disable.
If you are using the DOM elements for your checkboxes and inputboxes then I would say just add a user defined attribute in checkbox and inputbox elements. Some thing like
and onclick you can in your eventhandler access this attribute like
this will return you all the dependent ID’s as array.