Javascript API: queryTask error - where should I put the alert?

المشرف العام

Administrator
طاقم الإدارة
Where in the code do I add an error message if nothing is returned?

function execute() { // var queryTask = new QueryTask("http://sepa-app-gis01/arcgis/rest/services/live/SEARCH/MapServer/2"); var query = new Query(); query.returnGeometry = true; query.outFields = [ "POSTCODE" ]; query.text = dom.byId("Postcode").value.toUpperCase(); queryTask.execute(query, showResults); }; Should I add Error to the queryTask.execute first??

queryTask.execute(query, showResults, Error) Thank you for any help?



أكثر...
 
أعلى