Solved

Double Quotes problem with Cold Fusion and Text Form Fields

Posted on 2004-03-22
8
421 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 125 total points
ID: 10648942
what dosent seem correct - it has to work - try it & let me know ... what output r u getting ?

awaiting !
0
 

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
Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now