I tried using this example:
loc = new Locator("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer");
var address = {"Single Line Input": "100 main street"};
var params = {address: address};
loc.outSpatialReference= map.spatialReference;
loc.addressToLocations(params, function(e){
console.log("success: " + e);
},
function(e){
console.log("error: " + e);
});
But I get in the console the cross-domain warning saying that the request was blocked.
I get also "success: ". Which mean that e is empty.