?
Solved

Double Quotes problem with Cold Fusion and Text Form Fields

Posted on 2004-03-22
8
Medium Priority
?
451 Views
Last Modified: 2013-12-24
I am storing data in an Access Database.  In some cases the data contains double quotes.  When I use cold fusion to pull the data into a .cfm page the data displays fine.  However, when I pull the same data into a form field (to allow the user to edit it) the form field only displays the data up to the double quotes.

I need  a way for the user to be able to enter and edit data that may contain double quotes.  I know this can be done, but have not been able to figure it out.

Any suggestions?
0
Comment
Question by:SherryG
  • 3
  • 3
  • 2
8 Comments
 
LVL 17

Expert Comment

by:anandkp
ID: 10648750
User replace function & convert ur double quotes to 2 single quotes & get them displayed properly !

<INPUT TYPE="text" VALUE="<cfoutput>#replace(query.fieldname,'"',"''",'All')#</cfoutput>">

let me know ...

K'Rgds
Anand
0
 

Author Comment

by:SherryG
ID: 10648932
Am I reading this correctly.

query.fieldname, (single quote)(double quote)(singlequote), (double)(single)(single)(double),'All'

Something does not seem correct.

0
 
LVL 17

Accepted Solution

by:
anandkp earned 500 total points
ID: 10648942
what dosent seem correct - it has to work - try it & let me know ... what output r u getting ?

awaiting !
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 

Author Comment

by:SherryG
ID: 10649128
The dreamweaver color coding is not correct.  Almost as if the form field entry is not closed.  But...I tested it and it works.  Thanks for your quick response.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 10649332
way to go !

cheers
Anand
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10651582
Just a note - I realize that you marked this as complete - but this will convert all double quotes to 2 single quotes.  This may cause problems for people editing the content.

I think what you really wanted was this :

<input type="text" name="myfieldname" value="#HTMLEditFormat(query.fieldname)#">

Which will preserve the double quotes so the user can edit the text in an input.
0
 

Author Comment

by:SherryG
ID: 10651715
Thanks mcichmon that works great!
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10651753
No problem.

I wasn't trying to steal away points, I just thought you might like this answer instead since you aren't changing the data - just allowing it to display correctly.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question