【发布时间】:2010-06-14 19:38:42
【问题描述】:
当我尝试使用 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);
【问题讨论】:
-
你能得到不是textareas的其他元素的值吗?
-
我可以得到它们并且可以用 alert(tinyMCE.activeEditor.getContent()) 来提醒文本区域的内容