Skip to content
Browse files

Fixed bug where iframes wouldn't get the name property correctly set …

…on IE 6 using the HTML4 runtime.
  • Loading branch information...
1 parent d44361b commit f96dc7bcb9d0b5a100d2bb627359a50a8adf3660 @spocke spocke committed
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/javascript/plupload.html4.js
View
10 src/javascript/plupload.html4.js
@@ -140,13 +140,11 @@
function createIframe() {
- // Create iframe and add it to the container
- iframe = document.createElement('iframe');
- iframe.setAttribute('src', url + ':""'); // javascript:"" for HTTPS issue on IE6, uses a variable to make an ignore for jslint
- iframe.setAttribute('id', up.id + '_iframe');
- iframe.setAttribute('name', up.id + '_iframe');
- iframe.style.display = 'none';
+ var temp = document.createElement('div');
+ // Create iframe using a temp div since IE 6 won't be able to set the name using setAttribute or iframe.name
+ temp.innerHTML = '<iframe id="' + up.id + '_iframe" name="' + up.id + '_iframe" src="' + url + ':&quot;&quot;" style="display:none"></iframe>';
+ iframe = temp.firstChild;
container.appendChild(iframe);
// Add IFrame onload event

0 comments on commit f96dc7b

Please sign in to comment.
Something went wrong with that request. Please try again.