FCKEditorAPI is not defined
handleFill
var FCK = FCKeditorAPI.GetInstance('body')
var FCK = FCKeditorAPI.GetInstance('body');<input type="button" name="loadarticle" id="loadarticle" value="Load Article Into Body" onClick="preFill(document.getElementById('article').value)"><label>Body</label>
<div id="bodywrap">
<? $oFCKeditor = new FCKeditor('body') ;
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = stripslashes($body);
$oFCKeditor->Width = '750' ;
$oFCKeditor->Height = '400' ;
$oFCKeditor->Create() ;
print 'Tip: Use Ctrl+Enter for line breaks'; ?>
</div>handleFill
function preFill(art) {
document.getElementById('msg').innerHTML="Prefill";
http = createRequestObject();
http.open('get', 'prefill.php?art='+art);
http.onreadystatechange = handleFill;
http.send(null);
}
function handleFill() {
showedit();
if(http.readyState == 4){
if (http.status==200) {
var response = http.responseText;
if (response!="FAILURE") {
FCK.setHTML(response);
//document.forms.addcomponent.body.value = response;
//message ("settings saved");
} else {
alert("content not filled");
message("content not filled");
}
} else {
message('Error: content not received; ');
}
}
}var FCK = FCKeditorAPI.GetInstance('body')

Re: Problem setting editor content via AJAX
The FCKeditor docs recommend using FCKeditor_OnComplete, which only triggers when the editor is fully loaded. See the JavaScript API docs...