Nach 4 Stunden des Lesens Beiträge zu versuchen, dies zu lösen .....Jquery Form Plugin funktioniert nicht in IE 8
Ich benutze das Plugin Fotos hochzuladen und an den TinyMCE Editor zurückzukehren. Es funktioniert perfekt in Chrome und Firefox, schlägt aber im IE fehl. In den Dev-Tools bricht es in jquery.forms.js in Zeile 474 ab, da IE die finally
-Anweisung nicht erkennt. Also entferne ich es und dann erhalte ich Zugriff verweigert, wenn die gleiche Datei form.submit()
aufruft. Egal, was ich dieses Problem nicht lösen kann. Ich verwende Jquery v. 1.8.1
und Malsup Jquery Form Plugin v. 3.15
. Hier
ist der Code:
$("#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);
}
}
Jede Hilfe bei allen und sie werden meine geistige Gesundheit speichern, danke!