google-apps-script-html-service

Calling library function from html in that library

筅森魡賤 提交于 2020-07-10 10:42:55
问题 In order to share with my colleagues the AppsScript code I am developing, I created a standalone project used as a library in our Docs template. This library contains: a .gs file for the server side code a .html file for the client side sidebar In the sidebar, I have a button which triggers a call to a function from the library with a parameter. The javascript call is the following: google.script.run .withFailureHandler( function(msg, element) { showError(msg, $('#button-bar')); }) .test(); I

Materialize grid s12 not working in mobile view or on Chrome's developer tools

被刻印的时光 ゝ 提交于 2020-07-10 09:48:27
问题 I am using materialize to do my styling and grid on the Google Web App that I am working on, but I cannot get the grid to work on mobile devices. I did put the code suggested on Materialize documentation on my section and as also suggested on this question materialize grid s12 not working in mobile view however it is not working for me. <meta name="viewport" content="width=device-width, initial-scale=1.0"> What could I be doing wrong? My full HTML is <!DOCTYPE html> <html> <head> <title

Materialize grid s12 not working in mobile view or on Chrome's developer tools

你说的曾经没有我的故事 提交于 2020-07-10 09:48:00
问题 I am using materialize to do my styling and grid on the Google Web App that I am working on, but I cannot get the grid to work on mobile devices. I did put the code suggested on Materialize documentation on my section and as also suggested on this question materialize grid s12 not working in mobile view however it is not working for me. <meta name="viewport" content="width=device-width, initial-scale=1.0"> What could I be doing wrong? My full HTML is <!DOCTYPE html> <html> <head> <title

How to pass variables into an HTML body

徘徊边缘 提交于 2020-06-28 11:15:29
问题 I have created this script that allows me to select a certain food item and the serving size and then it calculates nutritional value, adds it to a database, sums it all at the end of the day and sends me an email with an overview. It almost all works, I am just having trouble passing some variables from my script into the HTML formatted email. In the portion of the code below, totals is the data values from a spreadsheet range. I expect the retrieved values of calories , caloriesFromFat ,

How to pass variables into an HTML body

感情迁移 提交于 2020-06-28 11:15:29
问题 I have created this script that allows me to select a certain food item and the serving size and then it calculates nutritional value, adds it to a database, sums it all at the end of the day and sends me an email with an overview. It almost all works, I am just having trouble passing some variables from my script into the HTML formatted email. In the portion of the code below, totals is the data values from a spreadsheet range. I expect the retrieved values of calories , caloriesFromFat ,

How to pass variables into an HTML body

这一生的挚爱 提交于 2020-06-28 11:15:01
问题 I have created this script that allows me to select a certain food item and the serving size and then it calculates nutritional value, adds it to a database, sums it all at the end of the day and sends me an email with an overview. It almost all works, I am just having trouble passing some variables from my script into the HTML formatted email. In the portion of the code below, totals is the data values from a spreadsheet range. I expect the retrieved values of calories , caloriesFromFat ,

How can I reference a Google Apps Script .html file from another library?

自闭症网瘾萝莉.ら 提交于 2020-06-28 11:03:20
问题 I'm writing a set of HTML pages that will be served on the Google Sheets sidebars and will connect to our internal database. Each page is set up on its own .html file within a single Google Apps Script project. I'd like to pull these files out to a single project and reference this as a library like I can do with my other .gs script files. Specifically, how can I write the "MyLib.page" line below? Library project: Code.gs function myFunc() { Logger.log("Hallo Werld!");} page.html <h1> Hello