Hi,
I have a dropdown selectbox:
And a bunch of checkboxes:
These are automatically generated by a Perl script. Each item in the dropdown will have a number of checkboxes associated with it.
I want it so as when you select an item from the dropdown it checks the associated chekcboxes, and unchecks those not associated.
I had a quick go but couldn;t seem to get it to work. How can I do this???
Thanks.
I have a dropdown selectbox:
Code:
<select name="units" style="width: 200px;">
<option value="">ALL</option>
<option value="">CPT1</option>
<option value="">CPT2</option>
</select>
And a bunch of checkboxes:
Code:
<label style="width: 60px;"><input type="checkbox" name="unit521" value="unit521" checked="checked" />521</label>
<label style="width: 60px;"><input type="checkbox" name="unit522" value="unit522" checked="checked" />522</label>
<label style="width: 60px;"><input type="checkbox" name="unit524" value="unit524" checked="checked" />524</label>
<label style="width: 60px;"><input type="checkbox" name="unit525" value="unit525" checked="checked" />525</label>
<label style="width: 60px;"><input type="checkbox" name="unit526" value="unit526" checked="checked" />526</label>
<label style="width: 60px;"><input type="checkbox" name="unit527" value="unit527" checked="checked" />527</label>
These are automatically generated by a Perl script. Each item in the dropdown will have a number of checkboxes associated with it.
I want it so as when you select an item from the dropdown it checks the associated chekcboxes, and unchecks those not associated.
I had a quick go but couldn;t seem to get it to work. How can I do this???
Thanks.