SherryG
asked on
Double Quotes problem with Cold Fusion and Text Form Fields
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?
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?
ASKER
Am I reading this correctly.
query.fieldname, (single quote)(double quote)(singlequote), (double)(single)(single)(d ouble),'Al l'
Something does not seem correct.
query.fieldname, (single quote)(double quote)(singlequote), (double)(single)(single)(d
Something does not seem correct.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
way to go !
cheers
Anand
cheers
Anand
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(que ry.fieldna me)#">
Which will preserve the double quotes so the user can edit the text in an input.
I think what you really wanted was this :
<input type="text" name="myfieldname" value="#HTMLEditFormat(que
Which will preserve the double quotes so the user can edit the text in an input.
ASKER
Thanks mcichmon that works great!
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.
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.
<INPUT TYPE="text" VALUE="<cfoutput>#replace(
let me know ...
K'Rgds
Anand