I am using asp.net-generated javascript wrappers for asp.net web services. In javascript, how to "wait"
for several async web services wrappers to finished returning some json data? Is there a general and elegant way in javascript to deal with waiting for async functions ?
I have tried using jquery $.ajax
, which has an option to use sync rather than async. What is the pro and cons for using sync $.ajax mode
?
I know that each wrapper takes a success event handler and a failure event handler . But I found the nesting of many success event handlers hard to read . I wonder if other users find the nesting awkward ...