Skip to main content
Participant
September 24, 2012
Question

comma in data

  • September 24, 2012
  • 2 replies
  • 585 views

i have a file of company names that i populate a select list with

but if the data contains a comma when i use the selected paramater it will not work

<cfselect name="lcustomer" query="qcust" display="ccustomer" value="ccustomer" selected="#qload.lcustomer#"  queryPosition="below">  

     <option>Select</option>  </cfselect>

if qload.lcustomer contains a comma  (some company, inc.) the selected fails

help?

This topic has been closed for replies.

2 replies

Inspiring
September 26, 2012

try:

1. Add preservedata = "yes" to your cfform tag

or

2. selected="replace(rs.field, ",", "chr(44)")"

Hope it works

WolfShade
Legend
September 24, 2012

I'm guessing that the delimiter is a comma.  Can you change the file and replace the comma in a company's name to the HTML encoded equivalent?

^_^