- Improve setting upload form attributes, IE7 uses 'encoding' attribute instead of 'enctype'

release-0.7
alecpl 13 years ago
parent 9e443d1529
commit c269b49587

@ -5833,11 +5833,12 @@ function rcube_webmail()
// handle upload errors, parsing iframe content in onload // handle upload errors, parsing iframe content in onload
$(frame_name).bind('load', {ts:ts}, onload); $(frame_name).bind('load', {ts:ts}, onload);
form.target = frame_name; $(form).attr({
form.action = this.url(action, { _id:this.env.compose_id||'', _uploadid:ts }); target: frame_name,
form.setAttribute('method', 'POST'); action: this.url(action, { _id:this.env.compose_id||'', _uploadid:ts }),
form.setAttribute('enctype', 'multipart/form-data'); method: 'POST'})
form.submit(); .attr(form.encoding ? 'encoding' : 'enctype', 'multipart/form-data')
.submit();
return frame_name; return frame_name;
}; };

Loading…
Cancel
Save