ajax - onreadystatechange events
the ajax - onreadystatechange event is triggered every time the readystate changes.event handlers are called as needed after a request is sent.
the ajax onreadystatechange event syntax :-
new xmlhttprequest().onreadystatechange = handler ;
ajax - onreadystatechange event example :-
when the readystate is 4 and status is 200, the response is ready.
note :- onreadystatechange event is triggerd five times (0 to 4),one time for each change in readystate.onreadystatechange event handler a function to be called automatically each time the readystate property changes.
ajax onerror event
the onerror event raised when there is an error that prevents the completion of the cross-domain request.
ajax onload event
the onload event raised when the object has been completely received from the server.
ajax onprogress event
the onprogress event raised when the browser starts receiving data from the server.