2 Replies Latest reply on Jun 19, 2008 7:56 AM by primalx2003

    Getting CFTEXTAREA value

    sromanski
      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?
        • 1. Re: Getting CFTEXTAREA value
          Level 7
          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/
          • 2. Re: Getting CFTEXTAREA value
            primalx2003
            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.