I didn't even notice it was a CFINPUT. I never use them, myself. But yeah, you're right. I don't like putting CF tags inside HTML tags anyway. Too messy.
And I believe Jillian is a 'she.' > -----Original Message----- > From: Phoeun Pha [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 16, 2002 4:17 PM > To: CF-Talk > Subject: RE: Checkbox Value > > > It's because he put CFIF tags inside a CF TAG. I dont think > that is allowed > and thus Coldfusion couldn't parse it correctly. > > -----Original Message----- > From: Everett, Al [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 16, 2002 3:14 PM > To: CF-Talk > Subject: RE: Checkbox Value > > > > Hard to tell without knowing exactly what behavior you're getting. > > Did you look at the HTML source? You want to make sure the > HTML itself is > rendering properly. (I see stuff like this all the time as a > result of a > missing <cfoutput> tag, and the tell-tale #s in the HTML are the first > clue.) > > You might be running into trouble if the field you're > checking for is NULL. > Try this comparison instead: <cfif Len(Trim(userinfo.worh)) GT 0 AND > userinfo.worh EQ 1> > > > > -----Original Message----- > > From: Jillian Carroll [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, October 16, 2002 3:51 PM > > To: CF-Talk > > Subject: Checkbox Value > > > > > > I know I'm close on this... this works with radio buttons. > > > > I have a query: > > > > <cfquery name="userinfo" datasource="#DSN#"> > > SELECT id, username, password, salutation, fname, lname, > > address, city, > > prov, country, pcode, worh, phoneh, phonew, faxh, faxw, > > email, datebox, > > centraladmin, provadmin, trainer, other > > FROM users > > WHERE id = #userid# > > </cfquery> > > > > And from the results of this query I want to determine > > whether a checkbox is > > checked. I tried: > > > > Please select if the above is a work address: <cfinput > type="checkbox" > > name="worh" value="1" <cfif userinfo.worh EQ 1>checked</cfif>> > > > > What am I doing wrong? > > > > -- > > Jillian > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

