Learning Web App Development by Semmy Purewal

Learning Web App Development by Semmy Purewal

Author:Semmy Purewal
Language: eng
Format: epub, pdf
ISBN: 9781449370190
Publisher: O'Reilly Media
Published: 2014-04-15T04:00:00+00:00


%userprofile%\AppData\Local\Google\Chrome\Application\chrome.exe –allow-file-access-from-files

This should open Chrome with the previously mentioned security restriction turned off. Like I said, we’ll only use this trick for this example in this chapter—in the next chapter, we’ll actually be running a real server and this won’t be necessary. For the time being, however, let’s verify that it’s working.

The getJSON Function

If we’ve successfully disabled Chrome’s cross-site scripting security restriction, we can easily get access to the local JSON file in our program. To do so, we’ll use jQuery’s getJSON function. Like many of our JavaScript examples, this jQuery request will be asynchronous so we’ll have to add a callback:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.