var request; function getRequestObject() { if ( window.ActiveXObject) { return ( new ActiveXObject("Microsoft.XMLHTTP")) ; } else if (window.XMLHttpRequest) { return (new XMLHttpRequest()) ; } else { return (null) ; } } function sendRequest() { request = getRequestObject() ; request.onreadystatechange = handleResponse ; request.open("GET", "http://mech.fis.agh.edu.pl/meteo/rest/json/info/", true); request.send(null); } function handleResponse() { if (request.readyState == 4) { //alert(request.responseText); var jsonObj=eval( "(" + request.responseText + ")" ); //alert(jsonObj[0].data.pa); // var txt = "
Licza przetworzonych wierszy: " + jsonObj.length.toString() + "
"; txt = "Identyfikator | Nazwa | Długość | Szerokość | Wysokość |
---|---|---|---|---|
szkoły | szkoły | geograficzna | geograficzna | " + jsonObj[i].station + " | " + jsonObj[i].name + " | " + jsonObj[i].long ; txt += " | " + jsonObj[i].lati + " | " + jsonObj[i].alti + " | " ; } txt += "