ajax request qml

Solutions on MaxInterview for ajax request qml by the best coders in the world

showing results for - "ajax request qml"
Storm
23 Sep 2019
1function makeRequest()
2{
3
4    var doc = new XMLHttpRequest();
5    msg.text = "";
6    doc.onreadystatechange = function() {
7        if (doc.readyState == XMLHttpRequest.HEADERS_RECEIVED) {
8            showRequestInfo("Headers -->");
9            showRequestInfo(doc.getAllResponseHeaders ());
10            showRequestInfo("Last modified -->");
11            showRequestInfo(doc.getResponseHeader ("Last-Modified"));
12
13        } else if (doc.readyState == XMLHttpRequest.DONE) {
14            var a = doc.responseXML.documentElement;
15            for (var ii = 0; ii < a.childNodes.length; ++ii) {
16                showRequestInfo(a.childNodes[ii].nodeName);
17            }
18            showRequestInfo("Headers -->");
19            showRequestInfo(doc.getAllResponseHeaders ());
20            showRequestInfo("Last modified -->");
21            showRequestInfo(doc.getResponseHeader ("Last-Modified"));
22        }
23    }
24
25    doc.open("GET", "data.xml");
26    doc.send();
27}