Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need easy to modify variable for Google Spreadsheet key #8

Open
dhornbein opened this issue Mar 31, 2014 · 1 comment
Open

Need easy to modify variable for Google Spreadsheet key #8

dhornbein opened this issue Mar 31, 2014 · 1 comment

Comments

@dhornbein
Copy link
Owner

Call for the Google Spreadsheet json data appears in the index.html file.

<script src="http://spreadsheets.google.com/feeds/list/0AspZRjIECCvPdGE0S3NIRzR0OW4ycDFVeU0wWmhDM1E/1/public/values?alt=json-in-script&amp;callback=phenClockGDImport"></script>

The script takes one variable, the key: 0AspZRjIECCvPdGE0S3NIRzR0OW4ycDFVeU0wWmhDM1E

Seen here in the Google Drive link:
https://docs.google.com/spreadsheet/ccc?key=0AspZRjIECCvPdGE0S3NIRzR0OW4ycDFVeU0wWmhDM1E

There should be a simple method for setting this variable.

Ideas

The easy way

Set a js var at the top of the page with the key:

var gdKey = 'AspZRjIECCvPdGE0S3NIRzR0OW4ycDFVeU0wWmhDM1E"

The better way

Have a input text field on the page which accepts the key and set's the GET variable so that the key can also be set via the URL. Input to the text box should accept both the key alone or the google doc link in full.

@thiagodemellobueno
Copy link
Collaborator

Said input box should pop a modal, know any simple vanilla js modals?
This should be easy enough.

But just having a key isn't enough right? the gdoc needs to be published/shared in some specific ways?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants