From 46484d91f49721a10b76e2c25071ad594f0b32d4 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 3 Jan 2007 10:09:30 +0000 Subject: add Prado.CallbackRequest.getRequestById(id) and Prado.CallbackRequest.dispatch(id) javascript methods. --- framework/Web/Javascripts/js/debug/ajax.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'framework/Web/Javascripts/js/debug') diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index 452a9ef8..c2822f10 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -431,6 +431,23 @@ Object.extend(Prado.CallbackRequest, requestQueue : [], + //all request objects + requests : {}, + + getRequestById : function(id) + { + var requests = Prado.CallbackRequest.requests; + if(typeof(requests[id]) != "undefined") + return requests[id]; + }, + + dispatch : function(id) + { + var requests = Prado.CallbackRequest.requests; + if(typeof(requests[id]) != "undefined") + requests[id].dispatch(); + }, + /** * Add ids of inputs element to post in the request. */ @@ -727,6 +744,9 @@ Prado.CallbackRequest.prototype = this.Enabled = true; this.id = id; + if(typeof(id)=="string") + Prado.CallbackRequest.requests[id] = this; + this.options = Object.extend( { RequestTimeOut : 30000, // 30 second timeout. -- cgit v1.2.3