Cross Domain Scripting reverseGeocode Service hosted at

Discussion created by itsmeprash on Nov 3, 2011
Latest reply on Nov 3, 2011 by DSwingley-esristaff

I am trying to invoke a reverseGeocode service hosted at use a simple ajax call.  Initially i got the following error  Origin http://localhost:8181 is not allowed by Access-Control-Allow-Origin.

To avoid the cross domain scripting error i am passing a callback function to this service. Now I keep getting an Unexpected token : error.

Has anybody encountered a similar error making an ajax call to

Or is there an api available in the ArcGIS API for JavaScript to do the same.

<!DOCTYPE html>
  <style>img{ height: 100px; float: left; }</style>
  <script src=""></script>
  <div id="images">

   location: "-75.749655520628295,39.68330984653565",
   distance: "5000",
   outSR: "4326",
   f: "pjson"
  function(data) {