News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Why are we Using Async in our Examples?

Started by ben2ong2, October 06, 2006, 04:37:56 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ben2ong2

All the examples here use the async mode (the third parameter of open() set to true).
The async parameter specifies whether the request should be handled asynchronously or not. True means that script continues to run after the send() method, without waiting for a response from the server. false means that the script waits for a response before continuing script processing. By setting this parameter to false, you run the risk of having your script hang if there is a network or server problem, or if the request is long (the UI locks while the request is being made) a user may even see the "Not Responding" message. It is safer to send asynchronously and design your code around the onreadystatechange event!
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login