PDA

View Full Version : [Ext 1.1b1] Form file upload response appearing in new window under IE



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;
}
...

jack.slocum
4 Jun 2007, 5:00 PM
Thanks for findng a fix. I will add it in!

seldon
12 Jun 2007, 5:58 AM
Thanks! This is what I was looking for!

vtswingkid
21 Jun 2007, 8:14 AM
I guess I better try the latest svn update. I just reverted back to 1.01a and everything fixed. Glad I found your post before I posted my own. Might have gotten beaten by the forum bruiser.

EDIT: I don't see this in the latest release of 1.1 svn.

EDIT: I do see it in the latest release of 2.0 svn. Could we get it put in 1.1 also please.

MD
21 Jun 2007, 6:10 PM
I second that request ;)

jack.slocum
22 Jun 2007, 5:08 AM
I do see it in the latest release of 2.0 svn. Could we get it put in 1.1 also please.

The joys of dual codebases. It's added!

poashoas
22 Mar 2009, 11:06 AM
Hi people,

Do I get this right? I am not using Ext so I like to you use it to... but have to implement it differently.. I just create a dynamic iframe? Is this fooling IE so it posts to an iframe after all??