google-sites

Search Google Drive folder from Google Site using Apps Script

北城以北 提交于 2019-12-12 17:13:38
问题 I have made a Google Site that contains a lot of Google Drive folders. Whenever I do a search using the Google Sites search thing, I can only find words that are one the Google Site. So the Google Drive Folders are not included in the search results. Anyway, I was looking on the web and I came across this piece of code: function doGet(e) { var results = DriveApp.getFolderById('File ID').searchFiles('fullText contains "' + e.parameter.q + '"'); var app = UiApp.createApplication(); var panel =

Calling Google Apps Script Gadget from custom Google Gadget?

倾然丶 夕夏残阳落幕 提交于 2019-12-12 04:43:38
问题 Using a Google Site with an embedded Google Apps Script, I'm displaying some data from a database using JDBC. The Google Apps Script uses doGet to load an HTML page: function doGet() { return HtmlService.createHtmlOutputFromFile('index'); } ...the index.html page in turn calls a function in my Apps Script to get some database data: google.script.run.withSuccessHandler(mySuccessHandler).getSomeDBData(); When the mySuccesshandler is called, I render the data with the JQuery. This works. However

Set custom cookies using Google Apps Script

十年热恋 提交于 2019-12-12 03:39:12
问题 is it possible to set a custom cookie through a Google Apps script gadget embedded in a Google site. I've been trying using the HtmlService class (through document.coookie in a script from the html file) but it doesn't seem to generate the cookie. I'm assuming this must be by design (i.e. Caja sanitisation). Is there another way? Thanks 回答1: It is not possible, by design, but you shouldn't need to; you can store information about the current user in UserProperties. 回答2: It's acctually

Highcharts/Highstock supported in Google Sites?

ぃ、小莉子 提交于 2019-12-11 19:46:27
问题 Is it possible to embed Highcharts scripts in Google sites? I've tried inserting an HTML box and also throwing everything in an HTML file and calling it via a Google Apps script. So far, both methods just give me all the text from the graph (title, axis labels, etc.), but no graph. I know embedding JS in a Google site is kind of tricky, but can this be done? 回答1: No. SVG (which Highcharts uses) is not supported within Caja (which an HTML Box and Apps Script use to sanitize and ensure safe

No scripts found

旧街凉风 提交于 2019-12-11 18:26:52
问题 I have multiple Apps scripts running on google classic web sites. As of today 11/5/18 when I try to access the code I get a "No scripts found" message. If I create & save a new script I can write the code, but if I leave & return the script is no longer there. This is already causing me serious problems. 回答1: Try locating your scripts on the Apps Script home page. https://script.google.com/home Here you will find all the scripts that you have created from your account irrespective of their

Can't log in to Google using HtmlUnit - Can't advance to web page for entering password

梦想的初衷 提交于 2019-12-11 13:59:24
问题 Has anyone successfully logged into Google using HtmlUnit recently? I used to be able to, but since upgrading the BrowserVersion my WebClient uses, I am locked out. Many thanks if you can help me as I am really stuck! I have been using BrowserVersion.CHROME from HtmlUnit-2.18. Login is a two-step process involving two forms. The first form has just the email field and the ‘Next’ button. After entering an email address and clicking ‘Next’, the second form displays. This form has the password

Getting New Google Site Published URL from Drive.Files.list

匆匆过客 提交于 2019-12-11 13:18:20
问题 So I'm working on something to list all sites within our domain. I can get this using Drive.File.list, and that's fine. I can query and get the name of the site and the owners email, however, I can't figure a way to get the sites published URL. This is the core of what I have so far: function getNewSites() { var responses = Drive.File.list({ corpus: "DEFAULT", maxResults: 1, q: 'mimeType="application/vnd.google-apps.site" and title="Test Site"', fields: "items/owners/emailAddress,items/title"

HTML content in google apps script

陌路散爱 提交于 2019-12-11 13:03:54
问题 how can I modify html code of gogle-site-page that was created with createPageFromTemplate methode? Look at this: This is how the page is created: page.createPageFromTemplate(name, ID, template); Now i need to add more html content: var created_page = SitesApp.getPageByUrl(that page); created_page.setHtmlContent(html code here); But when I use this setHtmlContent meethode I rewrite the template code. How can I go around this? Is there some way I could just add HTML, not re-write it? Thank you

How can you add a link to a google site via a Google Apps Script?

假如想象 提交于 2019-12-11 05:15:22
问题 I have been scripting a few ways to make my Google site easier to manage by dynamically creating pages. I want to be able to create a directory with links to those pages. So i was thinking something like... var page = site.getChildByName("NEW URL"); var link = [page.getUrl()]; page = site.getChildByName("URL TO DIRECTORY").addListItem(link); ...using google apps scripts. Haven't tested this too thoroughly as of yet but it haven't been able to get the links to work in the list. I was hoping to

Is there a way to present XML data in google sites

穿精又带淫゛_ 提交于 2019-12-10 22:32:51
问题 In our organisation, we use TodoList by abstract spoon to track our software projects. I like this tool because it's fairly light weight while allowing the developers to collaborate without any server maintenance issues. One thing I'd like to try out is setting up a project status page that our customers can view. Google sites offers a nice project status template which I thought I'd use. One of the things I'd like to be able to do is present the content of the todolist file (which is an XML