Hello,
I've been assigned the task to fix A news app which takes uploaded stories
(among other things that is why it is all dynamic) blows up when users have
a comma in their story. I am completely new to the code and a little (maybe
a lot) lost.
The user enters the Headline, Writer, and Story in a form, when their is no
commas in story all works fine, but when there is commas it errors:
An error occurred while evaluating the expression:
#ListGetAt(DBFieldList,num)#
The code that is sending the commas as separate list items is:
<cfloop list="#QGetContentItem.ContentItemFieldList#" index="CurrentItem"
delimiters=":"> <cfset ItemName=ListGetAt(CurrentItem,1,';')> <cfset
FormFieldList=ListAppend(FormFieldList,evaluate("form.#ItemName#"))> <cfset
DBFieldList=ListAppend(DBFieldList,ItemName)> </cfloop>
so I tried
<cfset NoCommas=#Replace("ItemName",",","^","ALL")>
so as to use a less often carat character and remove the commas, but am
completely stuck
after trying to put it in all kinds of places.
Any Takers?
Thanks!
Dave
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists