Hi Nancy I am using CF9, chr(10) was the character I needed to remove
Rob On 13 Mar 2012 at 11:02, [email protected] wrote: > > What version of CF are you using? I ran across a similar situation. > I wanted the hardspace after the variable and it worked fine in CF7. > When we upgraded to CF9, the hardspace was eliminated and I had to > hardcode a hardspace (#chr(13)##chr(10)#) to get my loop to work > correctly. > > > Nancy Graham > International Operations > SDF-AGB 4A > 502-329-3174 > -----Original Message----- > From: Rob Voyle [mailto:[email protected]] > Sent: Saturday, March 10, 2012 1:14 PM > To: cf-newbie > Subject: Re: cfloop list > > > Hi Dave > > Thanks, after much frustration I was able to get it to work. > > Here is one crazy thing I found. > When creating lists I prefer for ease of editing to create one entry > per line eg: > > listitem1, > listitem2, > listitem3, > > rather than string out one line > > listitem1,listitem2,listitem3, > > what that creates in the loop is a hardspace before each item so > when I create > the error variable: > <cfset "error#fieldName#" > I get a coldfusion error message "error fieldname" is not a valid > coldfusion > variable name. I tried taking out the " " with Replace but to no > avail. > > Thanks for your help > > rob > > > > <cfloop list="#form.fieldnames#" index="fieldname"> > > <cfset "error#fieldName#" = "here is your error message, the > > error value is: #evaluate('form.'&fieldname)#"> > > </cfloop> > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag= > houseoffusion > Archive: > http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid: > 5815 > Subscription: > http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm > Unsubscribe: > http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5820 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
