My script utilizes BlockUI to load a modal upload form for images and then uses the JQuery Form Plugin to submit the data from this form. This works fine in Firefox and Chrome, however when I attempt to submit the form in Internet Explorer 7, I am prompted with a download dialog asking to save the PHP file that is calling this code.
It still saves the file correctly, however instead of correctly displaying the success message and loading another blockUI growl notification, it prompts the user to save the file. Has anyone experienced this IE-specific issue? Here's the code I'm using:
$('.uploadLink').click(function() {
var uploadid = $(this).attr('name');
var title = $(this).attr('title');
$('#uploadBox .upload_input').attr('name','attachment_'+uploadid);
$('#uploadBox .imageid').attr('name',uploadid);
$('#uploadBox p strong').html(title);
$.blockUI({ message: $('#uploadBox') });
$('.blockOverlay').attr('title','Click to Close').click($.unblockUI);
return false;
});
$('.unblock').click($.unblockUI);
$('#uploadForm').ajaxForm({
target: '#testtest',
beforeSubmit: validateUpload,
success: function(responseText){
$.growlUI('Image Uploaded!','Your image has been uploaded',1500);
var input = $('#uploadBox .imageid').attr('name');
$('#'+input+'_info .upload_text_input').val(responseText);
$('#'+input+'_info .upload_img').attr("src",responseText).show();
}
});