@@ -38,9 +38,9 @@ Sys.Extended.UI.AsyncFileUpload = function(element) {
|
||||
/// <summary>
|
||||
/// A name of the form.
|
||||
/// </summary>
|
||||
/// <getter>get_formName</getter>
|
||||
/// <setter>set_formName</setter>
|
||||
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.formName" />
|
||||
/// <getter>get_postBackUrl</getter>
|
||||
/// <setter>set_postBackUrl</setter>
|
||||
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.postBackUrl" />
|
||||
this._formName = "";
|
||||
this._iframe = null;
|
||||
this._waitTimer = null;
|
||||
@@ -139,7 +139,13 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
set_postBackUrl: function(value) {
|
||||
this._postBackUrl = value;
|
||||
},
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Name of the form
|
||||
/// </summary>
|
||||
/// <getter>get_formName</getter>
|
||||
/// <setter>set_formName</setter>
|
||||
/// <member name="cP:AjaxControlToolkit.AsyncFileUpload.formName" />
|
||||
get_formName: function() {
|
||||
return this._formName;
|
||||
},
|
||||
@@ -373,7 +379,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
var mainForm = document.getElementById(this._formName);
|
||||
this._removeTimer();
|
||||
this.setThrobber(false);
|
||||
this._restoreFormTarget(mainForm);
|
||||
mainForm.target = "_top";
|
||||
mainForm.action = this._postBackUrl;
|
||||
var length;
|
||||
var contentType = "";
|
||||
@@ -422,7 +428,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
var url = this._postBackUrl;
|
||||
url += url.indexOf("?") === -1 ? "?" : "&";
|
||||
mainForm.action = url + 'AsyncFileUploadID=' + this.get_element().id + '&rnd=' + Math.random().toString().replace(/\./g, "");
|
||||
this._changeFormTarget(mainForm);
|
||||
mainForm.target = this._iframeName;
|
||||
cleanup = false;
|
||||
this.setThrobber(true);
|
||||
setTimeout(function() {
|
||||
@@ -485,7 +491,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
}
|
||||
|
||||
this._removeTimer();
|
||||
this._restoreFormTarget(mainForm);
|
||||
mainForm.target = "_top";
|
||||
mainForm.action = this._postBackUrl;
|
||||
if(this.get_completeBackColor() != "") {
|
||||
if(this._innerTB != null) {
|
||||
@@ -500,7 +506,7 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
}
|
||||
catch(ex) {
|
||||
this._removeTimer();
|
||||
this._restoreFormTarget(mainForm);
|
||||
mainForm.target = "_top";
|
||||
mainForm.action = this._postBackUrl;
|
||||
this._onError(ex.message);
|
||||
}
|
||||
@@ -526,16 +532,6 @@ Sys.Extended.UI.AsyncFileUpload.prototype = {
|
||||
setTimeout(function() { uploader._onError(Sys.Extended.UI.Resources.AsyncFileUpload_UploadingProblem); }, 0);
|
||||
this._waitTimer = null;
|
||||
}
|
||||
},
|
||||
|
||||
_changeFormTarget: function(form) {
|
||||
this._mainFormOldTarget = form.target;
|
||||
form.target = this._iframeName;
|
||||
},
|
||||
|
||||
_restoreFormTarget: function(form) {
|
||||
form.target = this._mainFormOldTarget;
|
||||
this._mainFormOldTarget = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user