google-sites

Google Apps Script How to link to JS or CSS file on Google Drive

落爺英雄遲暮 提交于 2019-12-04 10:48:42
问题 Can I keep style.css or anyscript.js hosted on a folder on Google Drive and then include the script with a link to the file in Drive? If so.. how? And here I mean GAS for use on Google Sites... so the script is not located in Google Drive 回答1: UPDATE: As of August 31, 2015 this technique has been deprecated by Google. Google recent made it possible host a file publicly on Google Drive: Create a folder in Google Drive Put any files you want to access publicly in the folder Share it publicly

Apps Script Gadget Setting 100% Width and Height Bug?

非 Y 不嫁゛ 提交于 2019-12-04 06:46:24
问题 I embedded a UiApp in a webpage in Google Site that contains a flextable. The width and height of the gadget can change depending on how many items are in the flextable; so when I embed it I leave the width and height blank in the gadget setting in order to get the UiApp shown 100% width and height (as instructed in the gadget setting). However, its never shown 100% height; when I check the HTML of the webpage I found that the width & the height is always set to a certain value (width="500"

Including javascript to google sites

半城伤御伤魂 提交于 2019-12-03 19:34:25
问题 I'm trying to include a simple javascript to Google Sites but I get nothing when pressing the button. I put the code inside an HTML Box. The code works perfectly when tested locally. Here is my code: <script> function calcul(){ x = parseFloat(document.getElementById("value1").value); y = parseFloat(document.getElementById("value2").value); document.getElementById("answer").innerHTML=x+y; } </script> <form action="" id="nothing"> <input type="text" id="value1"> <input type="text" id="value2">

How do I embed JavaScript code into a Google Sites page?

流过昼夜 提交于 2019-12-03 17:07:11
问题 I have a Google Sites page. How can I embed JavaScript code in it, without implementing a gadget and adding JavaScript code in that? 回答1: You can run some JavaScript code, but during page editing it will be automatically wrapped into a trivial gadget, and when rendering page it will be executed inside of iframe, and won't be able to interact with DOM of main page - this is prevented by security mechanisms of browser and Google Sites. So, anything your script do, it will do in a sandbox of it

How do I embed JavaScript code into a Google Sites page?

做~自己de王妃 提交于 2019-12-03 06:04:05
I have a Google Sites page. How can I embed JavaScript code in it, without implementing a gadget and adding JavaScript code in that? You can run some JavaScript code, but during page editing it will be automatically wrapped into a trivial gadget, and when rendering page it will be executed inside of iframe, and won't be able to interact with DOM of main page - this is prevented by security mechanisms of browser and Google Sites. So, anything your script do, it will do in a sandbox of it's iframe, who's outer size is defined at page design time, if you don't want to implement a gadget. And even

Apps Script Gadget Setting 100% Width and Height Bug?

给你一囗甜甜゛ 提交于 2019-12-02 09:01:43
I embedded a UiApp in a webpage in Google Site that contains a flextable. The width and height of the gadget can change depending on how many items are in the flextable; so when I embed it I leave the width and height blank in the gadget setting in order to get the UiApp shown 100% width and height (as instructed in the gadget setting). However, its never shown 100% height; when I check the HTML of the webpage I found that the width & the height is always set to a certain value (width="500" height="600") so my display is cut and not shown fully. How do I ensure that my UiApp are fully shown in

ReferenceError: “document” is not defined

我的梦境 提交于 2019-12-02 01:45:37
问题 Im new to JavaScript and even more new to Google Apps Script. Im trying a simple function that shows the current date (only day, month e and full year), but the Google Script show the error ReferenceError: "document" is not defined. My goal is to use this function in a Google Site. Here is the code: function Data() { var d=new Date(); var dia=d.getDate(); var mes=d.getMonth(); var ano=d.getFullYear(); var DataCompleta=dia + "/" + mes + "/" + ano document.write(DataCompleta); } 回答1: As said in

VLOOKUP style app script using UiApp and textBox form to reference a spreadsheet

别等时光非礼了梦想. 提交于 2019-12-01 13:17:28
I'm trying to create an app script to work inside a Google Site that has a search text box which is supposed to reference a Spreadsheet and spit out results from that search. The problem, I believe, exists in the second half of the code where I'm trying to reference the spreadsheet based on the text entered into the box provide by the code below. function doGet(e) { var doc = SpreadsheetApp.openById(SPREADSHEET_ID_GOES_HERE); var app = UiApp.createApplication().setTitle('New app'); // Create the entry form, a 1 x 2 grid with text boxes for name, age, and city that is then added to a vertical

VLOOKUP style app script using UiApp and textBox form to reference a spreadsheet

橙三吉。 提交于 2019-12-01 09:58:05
问题 I'm trying to create an app script to work inside a Google Site that has a search text box which is supposed to reference a Spreadsheet and spit out results from that search. The problem, I believe, exists in the second half of the code where I'm trying to reference the spreadsheet based on the text entered into the box provide by the code below. function doGet(e) { var doc = SpreadsheetApp.openById(SPREADSHEET_ID_GOES_HERE); var app = UiApp.createApplication().setTitle('New app'); // Create

How to create a custom Google Sites theme?

北城以北 提交于 2019-11-30 23:34:58
问题 I would like to create a custom theme. It is possible to apply other people's custom themes (http://www.gethemes.com/free-themes) but I cannot find documentation on how to create Google Sites themes. 回答1: I don't know how to create a entirely custom theme from scratch, but you can create a theme that is extremely "customized". In other words, you can create a new site, apply an existing theme, then customize colors, fonts, and background images (or textures) for all the various parts of the