解决ajax提交表单时不能取得FCKeditor内容问题

四 10th, 2008
<script language="javascript">
//解决ajax提交表单时不能取得FCKeditor内容问题
function fck_form_updater()
{
        this.UpdateEditorFormValue = function()
        {
                for ( i = 0; i < parent.frames.length; ++i )
                        if ( parent.frames[i].FCK )
                                parent.frames[i].FCK.UpdateLinkedField();
 
    for(i = 0 ; i < frames.length ; ++i){
       if(frames[i].FCK){
          frames[i].FCK.UpdateLinkedField();
       }
    }
        }
}
 
//在调用submit的ajax时如:
 
function responseCallback(xmlHttp){
 
    var fckupdater = new fck_form_updater();
 
    fckupdater.UpdateEditorFormValue();
 
    //…………………..
 
}
</script>
标签: ,
目前还没有任何评论.