Solved

Double Quotes problem with Cold Fusion and Text Form Fields

Posted on 2004-03-22
8
433 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 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