Rahul Sehrawat
asked on
Checkbox if corresponding checkbox is checked
Hi Experts,
I have a table with the dynamic fields (can be added by the user) and the structure is like this:
What I want is that the index key can only be checked if the corresponding key checkbox is checked, if the key checkbox is unchecked it should make sure to uncheck the index key as well.
I am really confused. How can I do it? thanks
I have a table with the dynamic fields (can be added by the user) and the structure is like this:
<table>
<tr>
<td><input name="key[]" value="" type="checkbox"></td>
<td><input name="index[]" value="" type="checkbox"></td>
</tr>
<tr>
<td><input name="key[]" value="" type="checkbox"></td>
<td><input name="index[]" value="" type="checkbox"></td>
</tr>
<tr>
<td><input name="key[]" value="" type="checkbox"></td>
<td><input name="index[]" value="" type="checkbox"></td>
</tr>
<tr>
<td><input name="key[]" value="" type="checkbox"></td>
<td><input name="index[]" value="" type="checkbox"></td>
</tr>
</table>
What I want is that the index key can only be checked if the corresponding key checkbox is checked, if the key checkbox is unchecked it should make sure to uncheck the index key as well.
I am really confused. How can I do it? thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER