From ac8908ea795f22e4bcf8726971919d6413a0b9e6 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Fri, 25 May 2012 10:33:43 +0000 Subject: TActiveFileUpload: enforce method and enctype to avoid some browsers being picky on controls created on ajax response --- .../Javascripts/source/prado/activefileupload/activefileupload.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'framework/Web/Javascripts/source') diff --git a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js index b16179c0..5f20944e 100755 --- a/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js +++ b/framework/Web/Javascripts/source/prado/activefileupload/activefileupload.js @@ -29,11 +29,19 @@ Prado.WebUI.TActiveFileUpload = Class.create(Prado.WebUI.Control, // set the form to submit in the iframe, submit it, and then reset it. this.oldtargetID = this.form.target; this.oldFormAction = this.form.action; + this.oldFormMethod = this.form.method; + this.oldFormEnctype = this.form.enctype; + this.form.action += (this.form.action.indexOf('?')!=-1 ? '&' : '?')+'TActiveFileUpload_InputId='+this.options.inputID+'&TActiveFileUpload_TargetId='+this.options.targetID; this.form.target = this.options.targetID; + this.form.method = 'POST'; + this.form.enctype = 'multipart/form-data'; this.form.submit(); + this.form.action = this.oldFormAction; this.form.target = this.oldtargetID; + this.form.method = this.oldFormMethod; + this.form.enctype = this.oldFormEnctype; }, finishUpload : function(options){ -- cgit v1.2.3