Ralph wrote:
Hi
I have couple elements with on click events which trigger the ajax to as
the server for informations. I'd like to be able to turn off all onclick
events at once and then turn them on when the response form the server
arrives.
Is it possible?
Use Matt Kruse's AjaxToolbox library. Before sending a request, use
the 'isActive' method to determine if a previous request hasn't
finished yet. If isActive returns true, do your 'request is active'
logic. Otherwise, send a new request.
<URL: http://www.ajaxtoolbox.com/request/>
Another option is to mess with the onclick handlers themselves (e.g.
remove or modify them when the request is made, replace them when the
call returns), that is unlikely to be as good as the above.
--
Rob