ajax jquery json, call google geo api - cant catch the answer

-OG7-

New Member
i would like to use google geo apiif i past this into the url:https://maps.googleapis.com/maps/api/geocode/json?address=montreal&sensor=falsei get json object as google api doc saysnow, what i want to do is:do it in ajax so thats my code:\[code\]$.ajax( { url: 'https://maps.googleapis.com/maps/api/geocode/json?address=montreal&sensor=false', dataType: 'json', success: function (data) { alert(data.d); } } ) };\[/code\]i checked that with firebug and i get the json object, but the result alert come before i get the object.i try to use callback function and jsonp and i get the same result,any ideas??thanks!
 
Back
Top