How do I use jQuery in a script attached to a Google Spreadsheet? The Google Libraries page seems to make it simple but apparently I misunderstand the execution environment for Libraries, calling google.load()
in the script fails.
So what is the right way to do this? I can imagine ideas like calls on UrlFetchApp.fetch()
but that doesn't seem like the right way.
(I know I get confused with the various Google App environments, so to be clear: I'm talking about a script saved in the 'script editor' under Tools on the menu for a Google Docs Spreadsheet.)
Anatomy of a Handler. Google Apps Script allows us to use jQuery, which is the preferred technique in HTML programing to date. I highly recommend learning as much jQuery as possible.
Some good examples of Ajax applications are Google Maps (http://maps.google.com/), Gmail (http://gmail.google.com/), and Google Docs and Spreadsheets (http://docs.google.com).
It is possible to use jQuery from Google Apps Script, but only through the HtmlService, and only in client-side scripts. It's mentioned in the HtmlService Best Practices documentation.
Some examples you'll find here on StackOverflow:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With