I am using this
$.getJSON('localhost/api/getStoreInventory', data, function(json) {});
to make a json call to an api I’m working on. This will work fine as long as I use localhost, once I change it to my product server ex:
$.getJSON('http://mydomain.com/api/getStoreInventory',
data, function(json) {});
the call will fail. Both api files on localhost and production are identical. I ran the json that my api returns through the JSLint.com json verifier and it reports my json is good with the default settings. Any help would be appreciated.
You can’t make cross domain ajax requests.
http://usejquery.com/posts/9/the-jquery-cross-domain-ajax-guide