Page 1 of 1
Re: AJAX, JQuery, JSON with api help needed please.
Posted: Tue Dec 21, 2010 9:52 am
by pickle
Check the permissions on the file. It seems the user the Apache user doesn't have read permissions on the file.
Re: AJAX, JQuery, JSON with api help needed please.
Posted: Tue Dec 21, 2010 11:13 am
by pickle
Actually, now that I look at the problem again, it's not file permissions, but a security issue built in to Javascript. To prevent cross domain scripting, AJAX calls cannot be made across domains. So if you're website is hosted at
www.yourwebsite.com, you can't make an AJAX request to api.yelp.com.
One solution to this problem is to use JSONP. I've never used it & don't fully understand it so I can't help you with it. If you're using Yelp in the same way others do, then Yelp might have information on how to get around this problem as well.