This project has moved. For the latest updates, please go here.


May 20, 2011 at 2:11 PM

Hello all

Rather simple question here that has been nagging at me to be answered: Why do almost all of the code examples in the discussion boards and in the documentation use async: false?

May 20, 2011 at 3:41 PM

That option controls whether or not the user is allowed to interact with the page while the ajax call is being made.  Most of the time, you are waiting on the results from the SPServices call, so the user can continue.  However, there are some very valid options when you will want to use async: true.  

Here's some more in depth info on the technique:

May 20, 2011 at 5:50 PM

Matt's got it about right.

When you set async: true, it means that you are not going to wait for the results of the call and your code will continue on. This usually doesn't makes sense in the context in which we use SPServices because we want to receive the returned XML so that we can act on it in some way.