Page 1 of 1

How to make checkboxes explicit

Posted: Thu Apr 27, 2006 3:11 am
by maciek4
I have 4 checkboxes and I can check all 4 of them, but my goal is to make them explicit. If I check for example A and then decide to change my mind and select B then A will be unselected, but I dont know how to do suck a thing. :bemused:

Code: Select all

<td bgCOLOR="#E0E0E0" class="tah11" align=left>
<INPUT TYPE="checkbox" NAME="progress[A]" value="work" <? echo isset($progress['A']) ? 'checked' : ''; ?>>&nbsp;A - du¿y<br>
<INPUT TYPE="checkbox" NAME="progress[B]" value="like" <? echo isset($progress['B']) ? 'checked' : ''; ?>>&nbsp;B<br>
<INPUT TYPE="checkbox" NAME="progress[C]" value="exam" <? echo isset($progress['C']) ? 'checked' : ''; ?>>&nbsp;C<br>
<INPUT TYPE="checkbox" NAME="progress[D]" value="exam" <? echo isset($progress['D']) ? 'checked' : ''; ?>>&nbsp;D - ma³y<br>

</td>

Posted: Thu Apr 27, 2006 3:51 am
by shiznatix
use a radio button instead and give all the fields the same name with a different value?

but if you have to use checkboxes you are going to have to use a javascript onclick thing.

Posted: Thu Apr 27, 2006 4:18 am
by JayBird
Moved to Client Side

Posted: Thu Apr 27, 2006 9:43 am
by pickle
~shiznatix hit the nail on the head.