I’m sure there is a simple explanation to this. I am having problems understanding why the following alert does not display in my javascript:
<script>
theURL = "gb.json?callback=?";
$.getJSON(theURL, null, function(data) {
alert('in json proc');
});
</script>
the file gb.json is in the same folder as the html containing the script. When I run it in Firebug it gets a return code of 200 OK and I see the contents of gb.json.
This must be something very simple that I’m missing. The alert should display, shouldn’t it?
It seems your server is returning regular JSON, not JSONP. Just pass the URL directly, without the added
callbackquery string: