If you are sending the data asynchronously, the script continues to run while it waits for an answer from the server.
If you are sending a large amount of data, or if the time required for processing the data is pretty long, then the best way to deal with this is by making a callback with the data asynchronously.
After you make a callback with the data you can continue working on your page.
When the callback is done, it automatically calls the function you specified.
This function is a client-side function and it must be implemented in your file.
If something happens while sending/receiving data from your server (such as a bad network connection),
you avoid your script hanging and blocking the page.
The syntax is:
ob_post.post(null, "myServerMethod", myFunction);
where
ProcessPage.aspx is the file on server where data will be called back and processed (use
null
to send data to the same page), the
myServerMethod is the public server-side method to be called and
myFunction is the client-side function called when the callback is done.
Please check the
asynchronous example to see how this method works.