only one button in a named group of "radio" buttons can be checked.
checking another button will automatically de-select the one that's checked.
by contrast, "checkboxes" can have any number checked or not, even if the
group of checkboxes is all named the same. Naming a checkbox group with the
same name will not cause the checkboxes to act like radio buttons. all it
will do is pass one comma delimited value to the action page, as opposed to
individual values for each checkbox.
----- Original Message -----
From: "Bushy" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Thursday, February 12, 2004 9:07 AM
Subject: re: <input> Checkboxes
> Why does this work with "radio" buttons and not "checkboxes"?
>
> <cfoutput query="update">
> <tr bgcolor="#bgColor(currentRow MOD 2,"silver","##EFEFEF")#">
> <td>#update.strUserName#</td>
> <td align="center">#update.strAccess#</td>
> <td align="center"><input type="checkbox" name="select"
value="#update.strAccess#" class="dirlinks"<cfif update.strAccess IS "yes">
Checked</cfif>></td>
> <td align="center"><input type="checkbox" name="select"
value="#update.strAccess#" class="dirlinks"<cfif update.strAccess IS "no">
Checked</cfif>></td>
> </tr>
> </cfoutput>
>
>
> The boxes are checked based on the update.straccess from the database. For
example if I check the "enable" box for username "test1" the disable box
still stays checked.
> I want them to toggle based on the selection so I can enable/disable
users.
>
> If I switch it to "radio" buttons then the enable/disable toggle works but
the "Checked" based on the <CFIF> statement doesn't come out?
>
> Why?
>
>
> Username Access Enable Disable
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
