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

时间:2022-09-19 21:35:19

I have a problem with my form when I try to submit with ajax. I am using Malsup Form plugin for Jquery but also using tinyMCE editor. When I submit the form and check the $_POST array, there is no data from the textarea. I have tried to use the triggerSave() function but to no avail. Everything is working well in IE.

当我尝试使用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 个解决方案

#1


1  

Just realised using beforeSerialise: instead of beforeSubmit: does the trick!

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

#1


1  

Just realised using beforeSerialise: instead of beforeSubmit: does the trick!

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