After 4 hours of reading posts to try to solve this.....
I use the plugin to upload photos and return it to the Tinymce Editor. It works perfect in Chrome and Firefox but fails in IE. In the dev tools, it breaks in jquery.forms.js on line 474 as IE wont recognize the finally
statement. So I remove it and then I receive access denied when the same file calls form.submit()
. No matter what I can't sove this issue. I'm using Jquery v. 1.8.1
and Malsup Jquery Form Plugin v. 3.15
.
Here is the 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);
}
}
Any help at all and you will save my sanity, thanks!