google-caja

Google Visualization not working with appscript html service

假如想象 提交于 2019-12-04 12:57:36
问题 I want to use appscript htmlservice along with appscript, The html service seems to work but the visualization do not work. Here is the code for reference. Code.GS : // Script-as-app template. function doGet() { return HtmlService.createHtmlOutputFromFile('html_visualization'); } html_visualization.html <html> <head> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1.0', {'packages':['corechart']});

Using Google Caja to run user-supplied Javascript

◇◆丶佛笑我妖孽 提交于 2019-12-03 22:44:30
问题 It appears that the official examples use a caja.js file that just wraps an iframe to load an URL from a server hosting a caja compilation service, which in turn, gets its input from some URL. The relevant API for that is available here. However, what I really want is to just safely (and repeatedly) run a user-supplied piece of Javascript, like so: for (var i = 0; i < N; ++i) { var x = getUserResult(currentState); updateState(currentState, x); } Is there any way to do this directly? The code

Browser Pop up in Google Apps Script

谁说我不能喝 提交于 2019-12-03 10:13:42
Background: I have prepared a form in HTML Service in Google apps script which I call with DoGet function from Code.gs. my doget function function doGet() { return HtmlService.createTemplateFromFile('HTMLUI').evaluate(); } Once published it presents a simple browser form with some labels, input box, submit, reset and find buttons on it. The user(s) will input information click submit and the data will get stored in a spreadsheet (background). - Working fine till here. Now when the user clicks find button - a popup kind of window needs to populated, in this popup user can enter information

Using Google Caja to run user-supplied Javascript

强颜欢笑 提交于 2019-12-01 02:17:31
It appears that the official examples use a caja.js file that just wraps an iframe to load an URL from a server hosting a caja compilation service, which in turn, gets its input from some URL. The relevant API for that is available here . However, what I really want is to just safely (and repeatedly) run a user-supplied piece of Javascript, like so: for (var i = 0; i < N; ++i) { var x = getUserResult(currentState); updateState(currentState, x); } Is there any way to do this directly? The code here has the compiler. Why can't I just use that to compile the code and then run that within an

How to make a tab panel using HTML Service

时光毁灭记忆、已成空白 提交于 2019-11-28 05:24:06
问题 How I can integrate a tabs panel to display in each tab a different HTML content and allow also the navigation of those panels, in Google Apps Script HTML Service? I tried to implement this simple code but it doesn't work, due to caja sanitization, it seems. <pre><ul id="tabs"> <li><a href="#tab1">Tab 1</a></li> <li><a href="#tab2">Tab 2</a></li> <li><a href="#tab3">Tab 3</a></li> </ul> <div id="container"> <div class="content"> <a name="tab1" id="tab1"></a> <h2>Tab 1</h2> <p>Lorem ipsum