Answer the question
In order to leave comments, you need to log in
Help get data from .json file
Hello!
I'm trying to parse data from another site using the $.getJSON(url,[data],[callback]) function.
Since the link goes to another domain, I write it like this:
url = "../../..php?jsoncallback=?"
But this approach only works if the path is set to a file with the php extension.
I want to access the file in json format.
How to correctly model a link to it?
Answer the question
In order to leave comments, you need to log in
Are you generating JSON or not? Because in order to work from another domain, you need not just JSON, but JSONP - en.wikipedia.org/wiki/JSONP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question