I am kind of new to JavaScript library's. I wanted to replace my current code with a JS lib jQuery. My current code looks like this.
function myajax()
{
var xmlhttp = new XMLHttpRequest();
var url = "http://localhost:8080/Marker1/webresources/org.sample.marker/markerlist";
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
myFunction(xmlhttp.responseText);
}
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
function myFunction(data) {
myArr = JSON.parse(data); // parsing JSON
updateMap(data);
}