diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-19 12:53:39 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-19 12:53:39 +0000 |
| commit | 363bfc4bef8536007f4c7b93703fe55f84dd7ebb (patch) | |
| tree | a86b470134508d26aa94b2f4666e91b1582fb415 /roundcubemail/program/js | |
| parent | 3d2886805994b7c9004942a2e13ad7362a9c5f51 (diff) | |
- Improve setting upload form attributes, IE7 uses 'encoding' attribute instead of 'enctype'
git-svn-id: https://svn.roundcube.net/trunk@5100 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index d15950d36..6da5a578c 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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; }; |
