summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js
index d15950d36..6da5a578c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -5833,11 +5833,12 @@ function rcube_webmail()
// handle upload errors, parsing iframe content in onload
$(frame_name).bind('load', {ts:ts}, onload);
- form.target = frame_name;
- form.action = this.url(action, { _id:this.env.compose_id||'', _uploadid:ts });
- form.setAttribute('method', 'POST');
- form.setAttribute('enctype', 'multipart/form-data');
- form.submit();
+ $(form).attr({
+ target: frame_name,
+ action: this.url(action, { _id:this.env.compose_id||'', _uploadid:ts }),
+ method: 'POST'})
+ .attr(form.encoding ? 'encoding' : 'enctype', 'multipart/form-data')
+ .submit();
return frame_name;
};