Hello,
One quick question :
With ...
... how do I automatically check cb_b[0] when cb_a[0] is checked? Same for cb_b[1] with cb_a[1], and so on.
The first method that comes in mind would be to loop through elements.length but I'd like to know if there is a much more elegant one.
doesn't work.
Thanks
One quick question :
With ...
Code:
...
<input type="checkbox" name="cb_a[0]">
<input type="checkbox" name="cb_a[1]">
<input type="checkbox" name="cb_a[2]">
...
<input type="checkbox" name="cb_b[0]">
<input type="checkbox" name="cb_b[1]">
<input type="checkbox" name="cb_b[2]">
...
... how do I automatically check cb_b[0] when cb_a[0] is checked? Same for cb_b[1] with cb_a[1], and so on.
The first method that comes in mind would be to loop through elements.length but I'd like to know if there is a much more elegant one.
Code:
document.form.cb_b[0].checked = document.form.cb_a[0].checked;
doesn't work.
Thanks