Hello everybody,
I’m not able to update a tiny mce text editor content in ajax (using php). Weirdly, if i update any div, it performs perfectly, but not in the case of the editor. I’m confused as to what i’m doing wrong here. Can you guys please help me?
This is my code…
if($("body") && go_url)
{
tinyMCE.triggerSave();
var xmlHttp= new Ajax.Updater("body",go_url,
{
parameters:Form.serialize('import_but'),
onLoading:function(){loading_in();},
onLoaded:function(){loading_out();},
onComplete:function(request)
{
if(xmlHttp.responseIsFailure( ))
{
alert('failed');
}
else
{
tinyMCE.get('body').setContent(request.responseText);
}
}
});
}
“body” is the id of the text area (that is converted into the tiny mce instance).
Again, I tested with a normal, plain div and it worked fine, but not with the editor.
Am i doing anything wrong???
Please help…