これを解決しようと4時間投稿を読んだ後.....
プラグインを使用して写真をアップロードし、それを Tinymce Editor に返します。Chrome と Firefox では問題なく動作しますが、IE では失敗します。finally
開発ツールでは、IE がステートメントを認識しないため、jquery.forms.js の 474 行目で中断します。だから私はそれを削除し、同じファイルが呼び出すとアクセスが拒否されましたform.submit()
。何があってもこの問題は解決できません。と を使用Jquery v. 1.8.1
してMalsup Jquery Form Plugin v. 3.15
います。
コードは次のとおりです。
$("#img-form").hide(); // hide the browse button
$("#image").change(function() {
$("#img-form").ajaxSubmit(options); // upload the file directly after selection
});
/*
* set options for jQuery form plugin
*/
var options = {
cache: false,
contentType:"text/html",
type: 'POST',
url: "../upload.php",
data: { width: w, height: h, bounds: b },
success: showResponse // post-submit callback
};
function showResponse(responseText, statusText, xhr, $form) {
var obj = JSON.parse(responseText);
var state = obj.state;
var response = obj.response;
if(state) {
tinyMCE.execCommand('mceInsertContent', false, response); // place the image into the editor
} else {
alert(response);
}
}
どんな助けでも、あなたは私の正気を救うでしょう、ありがとう!