Hi,
I work with ColdFusion so I create a fckeditor in my webpage using the provided ColdFusion components. The editor ends up as an iFrame in the resulting HTML page. On that page I make an Ajax call that retrieves data I want to display in the fckEditor textarea.
Using document.getelementById(<fckEditor instanceName>) (where fckEditor instanceName is the value given to fckEditor's attribute 'instanceName' at creation) doesn't do anything.
Is it possible to update the value of the textarea using Javascript? Or is this impossible with an iFrame and should I invoke the fckeditor in another way?
Thanks
Marc
I work with ColdFusion so I create a fckeditor in my webpage using the provided ColdFusion components. The editor ends up as an iFrame in the resulting HTML page. On that page I make an Ajax call that retrieves data I want to display in the fckEditor textarea.
Using document.getelementById(<fckEditor instanceName>) (where fckEditor instanceName is the value given to fckEditor's attribute 'instanceName' at creation) doesn't do anything.
Is it possible to update the value of the textarea using Javascript? Or is this impossible with an iFrame and should I invoke the fckeditor in another way?
Thanks
Marc
Re: How to dynamically update textarea with Javascript
To access and set the value of an FCKeditor textarea with Javascript do
FCKeditorAPI.GetInstance(<instanceName>).GetHTML() or FCKeditorAPI.GetInstance(<instanceName>).SetHTML()