Here’s a weird one that I’m struggling with:
I’ve got a web form that contains a bunch of checkboxes. When this form is submitted, the values of the checked checkboxes are saved to a SQL Server DB. Some of the checkboxes cause others to become disabled (i.e. if #1 is checked, #2-#5 must not be checked, but if #1 isn’t checked then you can check as many from #2-#5 as you like). This disabling function is done via an onClick event on checkbox #1.
The problem I have arises when people open previously saved forms to edit them further (a requirement of the application I’m developing). I have no problem using the DB to fill the checkboxes that were checked previosly, but because there’s no more onClick event for checkbox #1, I can’t get #2-#5 to come up as disabled when I re-populate the form with #1 checked.
Is there a way to check, on form submission, which checkboxes are disabled, and save that info to the DB along with the checked checkbox info? Or, if there’s a better way of accomplishing the same thing, I’d love to hear it (i.e. simulating a click event on checkbox #1 when it is loaded?).
Thanks in advance!