|
39 | 39 | if (options.async) {
|
40 | 40 | var form,
|
41 | 41 | iframe,
|
42 |
| - addParamChar; |
| 42 | + addParamChar, |
| 43 | + // javascript:false as initial iframe src |
| 44 | + // prevents warning popups on HTTPS in IE6. |
| 45 | + iframeSrc = 'javascript:false;'; |
| 46 | + |
| 47 | + if (options.iframeSrc) { |
| 48 | + iframeSrc = options.iframeSrc; |
| 49 | + } |
| 50 | + |
43 | 51 | return {
|
44 | 52 | send: function (_, completeCallback) {
|
45 | 53 | form = $('<form style="display:none;"></form>');
|
|
56 | 64 | options.url = options.url + addParamChar + '_method=PATCH';
|
57 | 65 | options.type = 'POST';
|
58 | 66 | }
|
59 |
| - // javascript:false as initial iframe src |
60 |
| - // prevents warning popups on HTTPS in IE6. |
61 | 67 | // IE versions below IE8 cannot set the name property of
|
62 | 68 | // elements that have already been added to the DOM,
|
63 | 69 | // so we set the name along with the iframe HTML markup:
|
64 | 70 | counter += 1;
|
65 | 71 | iframe = $(
|
66 |
| - '<iframe src="javascript:false;" name="iframe-transport-' + |
| 72 | + '<iframe src="' + iframeSrc + '" name="iframe-transport-' + |
67 | 73 | counter + '"></iframe>'
|
68 | 74 | ).bind('load', function () {
|
69 | 75 | var fileInputClones,
|
|
95 | 101 | );
|
96 | 102 | // Fix for IE endless progress bar activity bug
|
97 | 103 | // (happens on form submits to iframe targets):
|
98 |
| - $('<iframe src="javascript:false;"></iframe>') |
| 104 | + $('<iframe src="' + iframeSrc + '"></iframe>') |
99 | 105 | .appendTo(form);
|
100 | 106 | window.setTimeout(function () {
|
101 | 107 | // Removing the form in a setTimeout call
|
|
159 | 165 | // concat is used to avoid the "Script URL" JSLint error:
|
160 | 166 | iframe
|
161 | 167 | .unbind('load')
|
162 |
| - .prop('src', 'javascript'.concat(':false;')); |
| 168 | + .prop('src', iframeSrc); |
163 | 169 | }
|
164 | 170 | if (form) {
|
165 | 171 | form.remove();
|
|
0 commit comments