$.getJSON not working $.getJSON not working json json

$.getJSON not working


For chrome extensions to break cross-origin policies, you need to add the domain to your manifest file via the permissions entry:

"permissions": [  "tabs",  "bookmarks",  "http://slu.edu/",  "http://*.google.com/",  "unlimitedStorage"],

Source: http://code.google.com/chrome/extensions/manifest.html#permissions


You are correct in thinking this was a cross-site issue. If you look at the Chrome console, you should see something like:

XMLHttpRequest cannot load http://slu.edu/peoplefinder/json/json_index.php?q=. Origin http://jsbin.com is not allowed by Access-Control-Allow-Origin.

If you're running this on a server with scripting capabilities (eg: PHP), you can create a script on your own server which will fetch the remote data instead of doing it in the browser.