onreadystatechange. Remeber this name important for interviews.
onreadystatechange : This event sets or retrieves the event handler for asynchronous
requests.
This event is fired every time the value of the readyState property is changed.
Whenever there is a change we can recieve the response in the ReadyStateChange
event handler
The second event is ontimeout, Raised when there is an error that prevents the
completion of the request. Works from IE 8 onwards.
Points To Remember:
XMLHttpRequest Object has an event called "onreadystatechange" which is fired
everytime the readyState PROPERTY changes its value.
Go To Lesson 6