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

Getting CFTEXTAREA value

Explorer ,
Jun 17, 2008 Jun 17, 2008
When I use:

<cftextarea name="stuff" id="stuff" html="yes" enabled="Yes" visible="Yes" richtext="No" cols="30" rows="5"></cftextarea>

I can bind a div called content to stuff with the following:

document.getElementById('content').innerHTML=document.getElementById('stuff').value;

As soon as I turn richtext="yes" it breaks.

Does anyone know of a simple solution to this?
TOPICS
Advanced techniques
338
Translate
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 ,
Jun 17, 2008 Jun 17, 2008
the solution is not simple, since when you turn richtext on, FCKEditor
takes over your textarea. check FCKEditor documentation on their website
how to access the value (text) of the textarea.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
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 ,
Jun 19, 2008 Jun 19, 2008
LATEST
Try this.

<cftextarea name="stuff" id="stuff2" html="yes" enabled="Yes" visible="Yes" richtext="No" cols="30" rows="5"></cftextarea>

I can bind a div called content to stuff with the following:

document.getElementById('content').innerHTML=document.getElementById('stuff2').value;

By changing the id it makes it easier. I had a similar problem with my code. It took me several days to figure it out. Hopefully it works. But make sure to assign the value passed from the id=stuff2 to stuff.


Translate
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