posted 13 years ago
hello,
i'm trying to create a checkbox dialog similar to yahoo email with the 'select or deselect all' box. how do i make this button to be automatically selected if i select all the items below? for example, if i select this 'select all' box, all the items below are selected. but if it is unchecked and i select all the boxes below the 'select all' box is not checked. i hope i made myself clear. i'm fairly new with this so hopefully someone can answer this question for me. here's a sample code that i have:
.
<form name=myform>
<input type="checkbox" name=mybox value="1">all
<input type="checkbox" name=mybox value="1" checked>one
<input type="checkbox" name=mybox value="2" >two
<input type="checkbox" name=mybox value="3" checked>three
</form>
.
in the above example, i want the 'all' box to be checked if i select 'one' 'two' and 'three' checkbox.