can't load/read yahoo geocode as xml and read it in jquery
- by mastah
Hi, I tried saving the result as an xml, when I read from there it works, but if I read it from yahoo's api, doesn't load anything.
You can check it here
here's my script
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&zip=10035",
dataType: "xml",
success: function(xml) {
$(xml).find('Result').each(function(){
var city = $(this).find('City').text();
var state = $(this).find('State').text();
$('<div />').html('<p>'+city+'</p><p>'+state+'</p>').insertAfter('h2');
});
}
});
});