diff options
author | wei <> | 2006-05-06 02:26:20 +0000 |
---|---|---|
committer | wei <> | 2006-05-06 02:26:20 +0000 |
commit | a7f6c6640ac9295eec3ae2edbb2250179eb85e33 (patch) | |
tree | 8a3879c747dfc3bcd5d65f334341ea7c81ced268 /framework/Web/Javascripts/prado/ajax3.js | |
parent | 46155621cbf97191fca495cbd09a2eedd82afa82 (diff) |
Adding TActiveButton and TActiveTextBox
Diffstat (limited to 'framework/Web/Javascripts/prado/ajax3.js')
-rw-r--r-- | framework/Web/Javascripts/prado/ajax3.js | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/framework/Web/Javascripts/prado/ajax3.js b/framework/Web/Javascripts/prado/ajax3.js index 15f60631..b21e9429 100644 --- a/framework/Web/Javascripts/prado/ajax3.js +++ b/framework/Web/Javascripts/prado/ajax3.js @@ -167,10 +167,14 @@ Object.extend(Prado.CallbackRequest, msg += transport.responseText + "\n";
msg += "Data : \n"+inspect(data)+"\n";
msg += "Actions : \n";
- request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER).each(function(action)
+ data = request.getHeaderData(Prado.CallbackRequest.ACTION_HEADER);
+ if(data && data.length > 0)
{
- msg += inspect(action)+"\n";
- })
+ data.each(function(action)
+ {
+ msg += inspect(action)+"\n";
+ });
+ }
Logger.warn(msg);
}
},
@@ -262,13 +266,16 @@ Object.extend(Prado.CallbackRequest, abortRequestInProgress : function()
{
inProgress = Prado.CallbackRequest.requestInProgress;
+ Logger.info("aborting ... "+inProgress);
if(inProgress)
{
Logger.warn("aborted "+inProgress.id)
inProgress.request.transport.abort();
clearTimeout(inProgress.timeout);
Prado.CallbackRequest.requestInProgress = null;
+ return true;
}
+ return false;
},
/**
@@ -280,8 +287,16 @@ Object.extend(Prado.CallbackRequest, pagestate = $(this.FIELD_CALLBACK_PAGESTATE);
if(request.options.EnablePageStateUpdate && request.options.HasPriority && pagestate)
{
- Logger.warn("updating page state");
- pagestate.value = request.header(this.PAGESTATE_HEADER);
+ data = request.header(this.PAGESTATE_HEADER);
+ if(typeof(data) == "string" && data.length > 0)
+ {
+ Logger.warn("updating page state");
+ pagestate.value = data;
+ }
+ else
+ {
+ Logger.debug("Bad page state:"+data);
+ }
}
}
})
@@ -341,12 +356,17 @@ Prado.CallbackRequest.prototype = HasPriority : true,
CausesValidation : true,
ValidationGroup : null,
- PostInputs : true,
- postBody : this._getPostData(),
- parameters : ''
+ PostInputs : true
}
Object.extend(this.options, options || {});
-
+
+ //override parameter and postBody options.
+ Object.extend(this.options,
+ {
+ postBody : this._getPostData(),
+ parameters : ''
+ });
+
if(this.options.CausesValidation && typeof(Prado.Validation) != "undefined")
{
var form = this.options.Form || Prado.Validation.getForm();
|