by default the attribute a binding to form control binds to is VALUE.
since you have value="1" in your <cfinput>, that's the value it always
returns, no matter if the checkbox is checked or not.

but cf allows you to bind to any attribute! just bind to CHECKED
attribute, and it will work:

<cfselect name="Session1"
bind="cfc:OptionSelect.getSessions({Accessible:checked})"
bindonload="true" />

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



John Pullam wrote:
> I understand that a traditional checkbox does not show up on the form if it 
> is not checked and am quite comfortable with setting defaults and processing 
> it.
>
> But what about an Ajax implementation where the checkbox is used to trigger 
> the Ajax routine? I have a field defined as:
>
> <cfinput type="checkbox" name="Accessible" value="1">
>
> and it is bound to:
>
> <cfselect name="Session1" bind="cfc:OptionSelect.getSessions({Accessible})" 
> bindonload="true" />
>
> I have no problem getting the cfc to execute when I click or unclick the 
> checkbox, but what values are being sent (the behaviour seems a bit odd ... 
> it always behaves as though it is checked). How do I ensure that the accurate 
> status of the checkbox is sent to the cfc? 
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322331
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to