• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

populate cftextarea on cf8

Explorer ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

I am attempting to populate a cftextarea tag with html from a coldfusion object. I keep getting an error because of the html content in the database.

Any suggestions?

Views

646

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 15, 2007 Nov 15, 2007
have you tried it *without* jsstringformat()/urlencoded ()?

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate
Engaged ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

If the content in the DB contains characters that would affect the generated html tag(s), then that is likely why it is not working.

Try URLencoding the data before placing into the textarea and see if it works. If it does, then you will have to scrub the data before it is entered into the field each time; unless you are missing something particular for your CMS editor.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

I suspect that is what is happening, so I did try to URLencode the data, and it populates, but it paces the URLencoded value into the editor, when I want it to show the original html inserted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 14, 2007 Nov 14, 2007

Copy link to clipboard

Copied

try using
<cftextarea ...
value="#jsStringformat(noteOBJ.getNoteContent())#"></cftexarea>
instead of
<cftextarea ... >#jsStringformat(noteOBJ.getNoteContent())#</cftexarea>

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

I tried using the value attribute with jsstringformat and with urlencoded value and they don't populate the editor with html. jsstringformat populates with the slashes still in the text.

Any other ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2007 Nov 15, 2007

Copy link to clipboard

Copied

have you tried it *without* jsstringformat()/urlencoded ()?

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 16, 2007 Nov 16, 2007

Copy link to clipboard

Copied

LATEST
Not sure what I did, but using the value with no jsstringformat()/urlencoded () now works. Thank you for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation