How can I consume the JSON results from a URL after submitting a value in the text box that contains a arcgis
rest service?
$("#submitp").click(function () {
// alert('in');
var data_spacial1 = $('#spacial1').val();
alert(data_spacial1);
getspacial1(data_spacial1);
});
function getspacial1(data_spacial1) {
alert("Executing function");
$.ajax({
url: "data_spacial1", // where data_spacial1=http://164.100.133.211:6080/arcgis/rest/services/SoilM/2016April18/MapServer/0?f=pjson
data: { f: "json", where: "1=1", returnGeometry: false },
dataType: "jsonp",
jsonpCallback: "callback",
success: function (response) {
console.log("Received response: ", response);
alert("Success!");
}
});
}