Skip to content

Commit d644511

Browse files
committed
Fixed regression bug with POST file downloads not working in IE 6 or IE 7
1 parent 416abf9 commit d644511

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Scripts/jquery.fileDownload.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ $.extend({
128128
//the stock android browser straight up doesn't support file downloads initiated by non GET requests: http://code.google.com/p/android/issues/detail?id=1780
129129

130130
if ($().dialog) {
131-
$("<div>").html(settings.androidPostUnsupportedMessageHtml).dialog(settings.dialogOptions);
131+
$("<div>").html(settings.androidPostUnsupportedMessageHtml).dialog(settings.dialogOptions);
132132
} else {
133-
alert(settings.androidPostUnsupportedMessageHtml);
133+
alert(settings.androidPostUnsupportedMessageHtml);
134134
}
135135

136136
return;
@@ -247,7 +247,7 @@ $.extend({
247247
if (!key) return;
248248
var value = decodeURIComponent(kvp[1] || '');
249249

250-
formInnerHtml += $("<input type='text'>").attr("name", key).attr("value", value).wrap("<p>").parent().html();
250+
formInnerHtml += '<input type="hidden" name="' + key + '" value="' + value + '" />';
251251
});
252252
}
253253

@@ -274,7 +274,7 @@ $.extend({
274274
formDoc = getiframeDocument($iframe);
275275
}
276276

277-
formDoc.write("<html><head></head><body><form style='display:none' method='" + settings.httpMethod + "' action='" + fileUrl + "'>" + formInnerHtml + "</form>" + settings.popupWindowTitle + "</body></html>");
277+
formDoc.write("<html><head></head><body><form method='" + settings.httpMethod + "' action='" + fileUrl + "'>" + formInnerHtml + "</form>" + settings.popupWindowTitle + "</body></html>");
278278
$form = $(formDoc).find('form');
279279
}
280280

0 commit comments

Comments
 (0)