Consider the following AJAX code:
<pre>function loadReport() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("data").innerHTML = this.responseText; } }; xhttp.open("GET", "report.txt", true); xhttp.send(); }</pre>The <code>readyState</code> property holds the status of the <code>XMLHttpRequest</code>. So, <code>this.readyState == 4</code> means that
<pre>function loadReport() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("data").innerHTML = this.responseText; } }; xhttp.open("GET", "report.txt", true); xhttp.send(); }</pre>The <code>readyState</code> property holds the status of the <code>XMLHttpRequest</code>. So, <code>this.readyState == 4</code> means that
- A)server connection was established.
- B)request was received.
- C)request has finished and response is ready.
- D)request is being processed.
- E)request wasn't initialized yet.