I’m trying to get a JSON string using the Google Spreadsheets Data API. I’m trying to start out easy, just have an alert box pop up after the JSON string is successfully loaded.
$(function(){
var json_uri = "https://spreadsheets.google.com/feeds/list/0AvC4NUSdTIgddFJnUFRkcnI0QkJDLVg2eklZd0FZVVE/od6/public/values?alt=json";
$.ajax({
type: "GET",
url: json_uri,
success: function(data){
alert("success");
}
});
});
But I never see the alert box. What’s happening? I’m new to both JSON and the Spreadsheets API, so hopefully this is just some simple thing I’m overlooking.
Google’s sample page: http://code.google.com/apis/gdata/samples/spreadsheet_sample.html
My jsbin example page: http://jsbin.com/otuxiv/11
I’d set a dataType for the ajax call to dataType: ‘jsonp’, and also try changing
to
Haven’t had time to test but might get you past the IE error.