the <textarea> element exists on your page, but its ckeditor (richtext) 'incarnation' does not. thus calling ColdFusion.RichText.setValue() at this stage does not produce any results - because it uses ckeditor-specific javascript functions to populate the ckeditor instance of the textarea (which is actually an ifame, iirc) with content, not the actual <textarea> element.
Azadi On 15/06/2010 22:14, Scott Brady wrote: > But the text area exists on the page already. The empty cftextarea would be > available by the time the page loads (and the div isn't made a "dialog" > until after the page loads). The whole form exists when the page loads. > The ajax is just to get data for populating the form field values > themselves. > > So, I don't think that's the issue, unless I'm misunderstanding you. > > Scott > > On Mon, Jun 14, 2010 at 10:09 PM, Azadi Saryev <[email protected]>wrote: > >> On 15/06/2010 10:25, Scott Brady wrote: >>> The success function then populates the form (including the text area) >> i assume you are talking about $.ajax() [or similar] jquery success >> callback? >> that one will fire before the cf's richtext area is fully ready, thus >> your error. >> what you can do, is move the success callback into a separate named >> function (if you have it defined in-line in success: property of >> $.ajax()), and then call it using ajaxonload() cf function by putting >> <cfset ajaxonload('function-name-here')> >> as the last line before the closing </body> tag in your page that loads >> inside dialog. >> >> another option is to create a 'listener' that checks if cf richtext area >> is ready for use, and only then fire your function that populates the >> form. i don;t have code for this as i have never done it this way, but i >> think it can be done with setInterval() ... >> >> Azadi >> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334575 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

