How to sync webservice calls in javascript

I have a control app - using asp.net webservices.

I have a timer that makes an asynchronous webservice call every 5 seconds to refresh the screen. There are also custom buttons to update parts of the screen, as well as asynchronous webservice calls.

The problem is that my screen gets cluttered if a custom webservice command is issued before a timer webservice request is made. Basically, I want the user's command to wait if there is a pending asynchronous timer call in the process. How do I synchronize these calls in Javascript?

Thank.

0


source to share


1 answer


Is it possible to ignore a transient postback when a user postback occurs?

If so, check the 2 checkboxes (DontRequest and IgnoreNext) when the user makes a postback. When the user comes back in, disable DontRequest.



The automatic process does not start requests while DontRequest is set. If a response is received and IgnoreNext is set, ignore the response and remove the flag.

0


source







All Articles