CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread coldfusion . developer
Hi, I'm stuck on this and could use some help. I'm trying to populate a multiple selection form in edit mode and highlight (selected) items that are stored with the record. I'm storing the multiple selections in a single VarChar column using a comma delimiter. Thanks

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Alan Rother
BAD: CFIF #ListElement# = #GetCategoriesOutput.categorie_id#selected/CFIF GOOD: CFIF #ListElement# IS #GetCategoriesOutput.categorie_id#selected/CFIF In if statement is CF you have to use IS, EQ, NEQ =] -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Alan Rother
Oh yeah, You don't need the pound signs either. CFIF ListElement IS GetCategoriesOutput.categorie_idselected/CFIF -- Alan Rother Macromedia Certified Advanced ColdFusion MX 7 Developer ~| Message:

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Claude Schneegans
BAD: CFIF #ListElement# = #GetCategoriesOutput.categorie_id#selected/CFIF GOOD: CFIF #ListElement# IS #GetCategoriesOutput.categorie_id#selected/CFIF BETTER: CFIF ListElement IS GetCategoriesOutput.categorie_idselected/CFIF :-) -- ___ REUSE CODE! Use

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Aaron Rouse
Even better cfif ListElement IS GetCategoriesOutput.categorie_idselected=selected/cfif ;) On 3/9/06, Claude Schneegans [EMAIL PROTECTED] wrote: BAD: CFIF #ListElement# = #GetCategoriesOutput.categorie_id#selected/CFIF GOOD: CFIF #ListElement# IS

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Claude Schneegans
Even better cfif ListElement IS GetCategoriesOutput.categorie_idselected=selected/cfif Sorry, I don't see the point here? Is OPTION SELECTED=selected legal in HTML? Even if yes, what is the advantage? Anyway, the whole loop could be optimized: Instead of CFOUTPUT query=GetCategoriesOutput 682

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Aaron Rouse
It is valid XHTML(or maybe it was part of the HTML 4.0 spec), actually all upper case like that would not be if I remember correctly. It was more or less a joke on my part although it would be a good habbit for anyone to be in. Especially if they were ever to have to write code for things such

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Claude Schneegans
It is valid XHTML Ah ok. Personnally, I'll use XHTML when I'll need to, for the time being, I prefer having all CFML and HTML tags and attributes in upper case, and all variables and the rest of the code in lower case, question of readibility, but of course it is personal. Closing unnecessary

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Aaron Rouse
If you do a cfexit method=exittag in your custom tags then you could do the / method with them. Although maybe there are times that could not be done, can not honestly think of a time but I am sure there are some. We use a system here that uses a ton of custom tags and unfortunately it is just

Re: CFLOOP in Edit Mode - Invalid CFML construct

2006-03-09 Thread Claude Schneegans
If you do a cfexit method=exittag in your custom tags then you could do the / method with them. Just what I mean: you have to do something. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any