AJAX, JQuery, JSON with api help needed please.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: AJAX, JQuery, JSON with api help needed please.

Post by pickle »

Check the permissions on the file. It seems the user the Apache user doesn't have read permissions on the file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: AJAX, JQuery, JSON with api help needed please.

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply