onreadystatechange
Defines a function to be called when the readyState property changes
readyState
0: request not initialized.
1: OPENED
open() has been called. Server connection established.
2: HEADERS_RECEIVED
request received. send()
has been called, and headers and status are available.
3: LOADING
processing request. Downloading; responseText
holds partial data.
4: DONE
request finished and response is ready.
status
200: "OK"
403: "Forbidden"
404: "Page not found"
statusText
Returns the status-text (e.g. "OK" or "Not Found")