Jun 22, 2009, 12:07 PM
[ADDED] [V0.8.1] Ability to define event handlers for all ajax requests in the ScriptManager
Apologies if this is already implemented (couldn't see any examples).
It would be useful to have the ability to define a JavaScript handler for things like "onBeforeAjaxRequest", "onAjaxRequestSucceeded", "onAjaxRequestFailed" etc on the ext ScriptManager.
I see there are AjaxEvents for a given target or element, but I don't see how to set global handlers.
Example of what I mean:
This way, each developer doesn't have to remember to call these things manually from their own controls.
It would be useful to have the ability to define a JavaScript handler for things like "onBeforeAjaxRequest", "onAjaxRequestSucceeded", "onAjaxRequestFailed" etc on the ext ScriptManager.
I see there are AjaxEvents for a given target or element, but I don't see how to set global handlers.
Example of what I mean:
<ext:ScriptManager
runat="server"
onBeforeAjaxRequest="My.ClientSideApi.GettingData"
onAjaxRequestSucceeded="My.ClientSideApi.DataRetrieved"
etc />
For example, I have an application with a status bar. For every Coolite-based Ajax request, I'd like a global handler to fire before the ajax request is started so that I can add a little spinning icon in the status bar, and possibly some text, like "getting data..." etc. Then, when the request had eneded, I'd reset the status bar by calling a different JavaScript method.This way, each developer doesn't have to remember to call these things manually from their own controls.