Commit 6ad1e408 authored by Falko Timme's avatar Falko Timme
Browse files

- Remove hidden iframe after file upload.

parent 272aecd1
...@@ -154,15 +154,14 @@ function submitUploadForm(formname,target) { ...@@ -154,15 +154,14 @@ function submitUploadForm(formname,target) {
var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000); var frame_id = 'ajaxUploader-iframe-' + Math.round(new Date().getTime() / 1000);
jQuery('body').after('<iframe width="0" height="0" style="display:none;" name="'+frame_id+'" id="'+frame_id+'"/>'); jQuery('body').after('<iframe width="0" height="0" style="display:none;" name="'+frame_id+'" id="'+frame_id+'"/>');
var submitFormObj = jQuery('input[type="file"]').closest("form").attr({target: frame_id, action: target}).submit(); jQuery('input[type="file"]').closest("form").attr({target: frame_id, action: target}).submit();
jQuery('#'+frame_id).load(function() { jQuery('#'+frame_id).load(function() {
var msg = handleResponse(this); var msg = handleResponse(this);
jQuery('#errorMsg').remove(); jQuery('#errorMsg').remove();
jQuery('#OKMsg').remove(); jQuery('#OKMsg').remove();
jQuery('input[name="id"]').before(msg); jQuery('input[name="id"]').before(msg);
jQuery(this).remove();
}); });
//jQuery('#'+frame_id).remove();
/* /*
if(redirect != '') { if(redirect != '') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment