Can someone tell me what could be wrong with this javascript?
$.ajax({
cache:false,
url: 'http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false',
success: function(data, textStatus, jqXHR) {
console.log('success');
console.log(data);
},
error: function(jqXHR, textStatus, errorThrown) {
console.log('error');
console.log(errorThrown);
console.log(jqXHR);
}
});
The error event handler function is called, and this is my output to the console:
error
undefined
XMLHttpRequest { mozResponseArrayBuffer=ArrayBuffer, status=0, more...}
I'm trying to learn how to make ajax calls using jquery, and I'm still pretty new to this.
source
share