Google doc spreadsheets can be used as client-side-only data endpoints with the jsonp protocol
Here is a simple demo of my document that contains
name age
--------------
mildred 35
treebeard 9,001
goku 7
Google doc spreadsheets can be used as client-side-only data endpoints with the jsonp protocol
Here is a simple demo of my document that contains
name age
--------------
mildred 35
treebeard 9,001
goku 7
| <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> | |
| <script src='index.js'></script> | |
| <div class='data'></div> |
| $(function(){ | |
| entryTemplate = _.template("<div><span>Age is <%= age %></span> <span>while name is <%= name %>.</span></div>") | |
| $.getJSON( | |
| 'https://spreadsheets.google.com/feeds/list/0AngeFDdGwfDydENTa3FWM05YYnlOMENCanpCZU4tZ0E/od6/public/values?alt=json-in-script&callback=?' | |
| ).done(function(data){ | |
| data.feed.entry.forEach(function(entry){ | |
| $('.data').append(entryTemplate({age: entry.gsx$age.$t, name: entry.gsx$name.$t})) | |
| }) | |
| }) | |
| }) |