Note that there are some explanatory texts on larger screens.

plurals
  1. POJSON data fetching through Yahoo! Placefinder
    text
    copied!<p>I am trying to retrieve information from the Placefinder API. My code takes information from a text box and sends it to yahoo on a button click. </p> <pre><code> function codeAddress(){ var address = document.getElementById("address").value; var RequestUrl = "http://where.yahooapis.com/geocode?q="+address+"&amp;flags=J&amp;callback=ws_results&amp;output=json"; JSONObject = new XMLHttpRequest(); JSONObject.open( "GET", RequestUrl, false ); JSONObject.send( null ); return JSONObject; document.getElementByID("jlatitude").innerHTML=JSONObject.latitude; alert(document.write("jlatitude")); } </code></pre> <p>Firebug tells me that the data is returned, yet I cannot display what I want in a troubleshooting popup. The placefinder returns this when I request the geocoding for Maryland.</p> <pre><code>{"ResultSet":{"version":"1.0","Error":0,"ErrorMessage":"No error","Locale":"us_US","Quality":10,"Found":2,"Results":[{"quality":49,"latitude":"39.466626","longitude":"-93.709069","offsetlat":"39.466626","offsetlon":"-93.709069","radius":700,"name":"","line1":"","line2":"Roads, MO","line3":"","line4":"United States","house":"","street":"","xstreet":"","unittype":"","unit":"","postal":"","neighborhood":"Roads","city":"Norborne","county":"Carroll County","state":"Missouri","country":"United States","countrycode":"US","statecode":"MO","countycode":"","uzip":"64668","hash":"","woeid":2482523,"woetype":7},{"quality":49,"latitude":"39.080130","longitude":"-82.537394","offsetlat":"39.080130","offsetlon":"-82.537394","radius":700,"name":"","line1":"","line2":"Roads, OH","line3":"","line4":"United States","house":"","street":"","xstreet":"","unittype":"","unit":"","postal":"","neighborhood":"Roads","city":"Wellston","county":"Jackson County","state":"Ohio","country":"United States","countrycode":"US","statecode":"OH","countycode":"","uzip":"45692","hash":"","woeid":2482522,"woetype":7}]}} </code></pre> <p>My alert box does not appear, but the data is stored. </p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload