Examine the following code. function getData() { var url = "ajaxdata/citStudents.txt"; var request = new XMLHttpRequest(); request.open("GET", url); request.onreadystatechange = function() { if...






  1. Examine the following code.


    function getData() {
        var url = "ajaxdata/citStudents.txt";
        var request = new XMLHttpRequest();
        request.open("GET", url);
        request.onreadystatechange = function() {
            if (request.readyState == 4 && request.status == 200) {
               alert(request.responseText);
            }
        };
        request.send(null);
    }


    What does it mean if the condition (request.readyState == 4 && request.status == 200) evaluates as true?























    it means there were no http errors and that the data has been returned to the browser.





    it means there were was an HTTP error and that the data will not be returned to the browser.





    it means the request has been sent and data will be back in 200 milliseconds or less.








Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here