ajax在Firefox上发布了tinyMCE缺少的数据

时间:2010-06-14 19:38:42

标签: jquery ajax tinymce

当我尝试使用ajax提交时,我的表单出现问题。我正在为Jquery使用Malsup Form插件,但也使用tinyMCE编辑器。当我提交表单并检查$ _POST数组时,textarea中没有数据。我试过使用triggerSave()函数但无济于事。 IE中的一切运作良好。

// These options are common and will be used for many form submissions

    var options = {
        target: '#notice',   // target element(s) to be updated with server response
        dataType:'html',
        resetForm:true,
        beforeSubmit: function(){tinyMCE.triggerSave(false,true);
        },

        success:function(msg){
            $('#notice').html( msg)
            refresh(3)
        }
    };
   //prepare form
    $('#savetext').ajaxForm(options);

1 个答案:

答案 0 :(得分:1)

刚刚使用beforeSerialise实现:而不是beforeSubmit:诀窍!