diff options
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r-- | framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js | 6 | ||||
-rw-r--r-- | framework/Web/Javascripts/source/prado/activecontrols/ajax3.js | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js index 444f3ab2..28bd3fa9 100644 --- a/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/activecontrols3.js @@ -213,12 +213,14 @@ Prado.WebUI.TTimeTriggeredCallback = Base.extend( start : function(id)
{
- Prado.WebUI.TTimeTriggeredCallback.timers[id].startTimer();
+ if(Prado.WebUI.TTimeTriggeredCallback.timers[id])
+ Prado.WebUI.TTimeTriggeredCallback.timers[id].startTimer();
},
stop : function(id)
{
- Prado.WebUI.TTimeTriggeredCallback.timers[id].stopTimer();
+ if(Prado.WebUI.TTimeTriggeredCallback.timers[id])
+ Prado.WebUI.TTimeTriggeredCallback.timers[id].stopTimer();
}
});
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js index 27537e8b..ccd8df12 100644 --- a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js @@ -319,8 +319,7 @@ Object.extend(Prado.CallbackRequest, */
dispatchNormalRequest : function(callback)
{
- //Logger.info("dispatching normal request");
- //new Prado.AjaxRequest(callback);
+ callback.options.postBody = callback._getPostData(),
callback.request(callback.url);
return true;
},
@@ -352,7 +351,7 @@ Object.extend(Prado.CallbackRequest, var self = Prado.CallbackRequest;
var pagestate = $(self.FIELD_CALLBACK_PAGESTATE);
var enabled = request.ActiveControl.EnablePageStateUpdate && request.ActiveControl.HasPriority;
- var aborted = self.currentRequest == null;
+ var aborted = typeof(self.currentRequest) == 'undefined' || self.currentRequest == null;
if(enabled && !aborted && pagestate)
{
var data = request.getBodyContentPart(self.PAGESTATE_HEADER);
@@ -393,19 +392,20 @@ Object.extend(Prado.CallbackRequest, callback.options.postBody = callback._getPostData(),
//callback.request = new Prado.AjaxRequest(callback);
- callback.request(callback.url);
callback.timeout = setTimeout(function()
{
//Logger.warn("priority timeout");
self.abortRequest(callback.id);
},callback.ActiveControl.RequestTimeOut);
+ callback.request(callback.url);
//Logger.debug("dispatched "+self.currentRequest.id + " ...")
},
endCurrentRequest : function()
{
var self = Prado.CallbackRequest;
- clearTimeout(self.currentRequest.timeout);
+ if(typeof(self.currentRequest) != 'undefined' && self.currentRequest != null)
+ clearTimeout(self.currentRequest.timeout);
self.currentRequest=null;
},
|