Author: andrei_exadel
Date: 2008-02-26 08:03:54 -0500 (Tue, 26 Feb 2008)
New Revision: 6344
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
fix uploading into _blank window in IE
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
---
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-26
12:31:56 UTC (rev 6343)
+++
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-26
13:03:54 UTC (rev 6344)
@@ -405,14 +405,13 @@
},
createFrame: function () {
+ var div = document.createElement("div");
+ div.style.display = 'none';
+ var child = "<iframe name='"+this.id+"'
id='"+this.id+"_iframe'></iframe>";
+ div.innerHTML = child;
+ document.body.appendChild(div);
var iframe = $(this.id + "_iframe");
- if (!iframe) {
- iframe = document.createElement("iframe");
- iframe.id = this.id + "_iframe";
- iframe.name = this.id;
- iframe.style.display = 'none';
- document.body.appendChild(iframe);
- }
+
this.iframe = iframe;
return iframe;
},
@@ -421,7 +420,7 @@
deleteFrame: function() {
if (this.iframe) {
this.iframe.src = "about:blank";
- document.body.removeChild(this.iframe);
+ document.body.removeChild(this.iframe.parentNode);
}
this.iframe = null;
},
Show replies by date