Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
/*member employeeid, firstname, lastname, password, user, results*/

var x;

if (Connect.clicked) {
  var headers = {"user":"<google id>","password":"<access token>"};
  var readquery = '/google/spreadsheets/query/key/<your spreadsheet key>?wsname<thewsname=<the name of your worksheet>';

    var results = http.get(readquery,headers);
    GSResults.value = results;
    eval('x=' + results);

    var opts = [''];
    if (x.results) {
        for (var i = 0; i < x.results.length; i++) {
            if (x.results[i].employeeid) {
                opts[i + 1] = x.results[i].employeeid + '=' + x.results[i].firstname + ' ' + x.results[i].lastname;
            }
        }
    }
    EId.options = opts;
}

...