We are having trouble getting FCKeditor_OnComplete to work when it is loaded on an Ajax call with the editor itself. We use a PHP object to create the instance, as well as the FCKeditor_OnComplete function. It works perfectly when the the instance is loaded with the page, but when it is pulled in via Ajax, the editor will not call the function. Yes, the FCKeditor_OnComplete function is before the instance, and this is exactly what is returned:
The alert('test2') fires, but the alert('test') does not.
<script language="javascript" type="text/javascript"> function FCKeditor_OnComplete(EDITOR){ EDITOR.Events.AttachEvent('OnBlur', function(){alert('test');;});};alert('test2');; </script> <input type="hidden" id="description" name="description" value="" style="display:none" /><input type="hidden" id="description___Config" value="" style="display:none" /><iframe id="description___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=description&Toolbar=Basic" width="100%" height="200" frameborder="0" scrolling="no"></iframe>
The alert('test2') fires, but the alert('test') does not.