IGx89
4 Jun 2007, 3:27 PM
Anyone else experiencing this? When I use Ext 1.1b1's ability to upload files by posting the form in a dynamically-created IFRAME, in IE only the response from the POST appears in a new window (instead of in the hidden IFRAME). My fix, taken from this helpful thread (http://forums.devx.com/showthread.php?threadid=133717), is as follows (inside Ext.data.Connection):
doFormUpload : function(o, ps, url){
var id = Ext.id();
var frame = document.createElement('iframe');
frame.id = id;
frame.name = id;
frame.className = 'x-hidden';
if(Ext.isIE){
frame.src = Ext.SSL_SECURE_URL;
}
document.body.appendChild(frame);
+
+ if(Ext.isIE){
+ document.frames[id].name = id;
+ }
var form = Ext.getDom(o.form);
form.target = id;
form.method = 'POST';
form.enctype = form.encoding = 'multipart/form-data';
if(url){
form.action = url;
}
...
doFormUpload : function(o, ps, url){
var id = Ext.id();
var frame = document.createElement('iframe');
frame.id = id;
frame.name = id;
frame.className = 'x-hidden';
if(Ext.isIE){
frame.src = Ext.SSL_SECURE_URL;
}
document.body.appendChild(frame);
+
+ if(Ext.isIE){
+ document.frames[id].name = id;
+ }
var form = Ext.getDom(o.form);
form.target = id;
form.method = 'POST';
form.enctype = form.encoding = 'multipart/form-data';
if(url){
form.action = url;
}
...