When working with JSON, sometimes you'll want access to some data that is on a server other…than the one you're currently in, but there's a problem with that.…Some browsers have what's called a same-domain policy.…That means that you can only request data from a site that is in the same place as the…file you're requesting from.…Let me show you how it works.…I'm going to use the Google Chrome browser.…This may not happen to you if you're using Safari, so make sure you try it using Google…Chrome if you want to follow along.…I have a folder with some files, and these files are on my hard drive.…
Now, I've placed a JSON document right here on a server, and you can see the opened JSON…document up here on the Google Chrome browser.…Now, what I'm going to do is modify the location of where the document myscript.js is getting…the JSON data from.…Right now, it's assuming that it's on the same folder as this file, so it should be…right here. But I put this on the server, so I'm going to go ahead and put the URL to the server data.…
- What is JSON?
- Creating simple data
- Communicating across sites with JSONP
- Rotating with jQuery Cycle