What does Asynchronous means in Ajax? and also how does Ajax know when to pull data without server polling?
+3
A:
Just about what it means in any other context. When you make an ajax call, it doesn't block until it returns.
fastcodejava
2010-08-03 05:17:27
+5
A:
Asynchronous means that the script will send a request to the server, and continue it's execution without waiting for the reply. As soon as reply is received a browser event is fired, which in turn allows the script to execute associated actions.
Ajax knows when to pull data from server, because you tell it when to do it.
Mchl
2010-08-03 05:18:48
@Mchl: "Ajax knows when to pull data from server, because you tell it when to do it." How do i do that?
JCX
2010-08-03 05:25:57
You, as a creator of the script, tell it to send a request to server when certain conditions are met (for example: 'when DOM is ready', 'when user presses this button', 'when value in textfield changes', 'every 5s', etc).
Mchl
2010-08-03 05:34:51
where can i find reference codes for this?
JCX
2010-08-03 05:44:06
Err... on the internet? Search for 'AJAX tutorials'http://www.w3schools.com/ajax/ajax_intro.asp
Mchl
2010-08-03 05:57:11