Afraid it doesn't seem to return anything?:
var query2 = new Query();
query2.geometry = geometryEngine.union(inBuffer);
query2.returnGeometry = false;
query2.outFields = ["NAME"];
var queryTask2 = new QueryTask("http://rest/services/live/SEARCH/MapServer/15");
queryTask2.execute(query2, function (results2) {
for (var j = 0; j < results2.features.length; j++) {
resultItems.push("<b>Local Authority:</b> " + results2.features.attributes.NAME + "<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
console.log();
});
dom.byId("results")
function addToMap(result) {
}
my html:
<body>
Postcode :
<input type="text" id="Postcode" value="">
<input id="execute" type="button" value="Get Details">
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
<table id="mapTable"><tr><td><div id="map"></div></td></tr>
</table>
<div id="result" style="padding:5px; margin:5px; background-color:#00ff90;">
</div>
</body>