I'm building a web application in Google Sites. Currently, I have two forms, the first one loads a Spreadsheet and displays it as a table, then when you select a row from the table, the script calls another Web App with a GET request and with a few parameters (as ?rowIndex=X&columnIndex=..
).
This is working fine if I deploy the first form as a Web App. But if I insert the first script as a "Google Apps Script Gadget" in my Google Sites webpage it seems that is embedded as an Iframe that cannot redirect to other webpages/scripts (it just shows a blank iframe).
Is there any way to solve this without merging both scripts in one?
For the redirect, I'm using javascript in the HTML form.
windows.location="secondScriptUrl"+"?parameters..."
and the second script just generates the HTML from the doGet
function
function doGet(e) {
return HtmlService.createTemplateFromFile('index').evaluate();
}
google.script.run.yourFunctionToGetHtmlContent()
. is going to be faster than a whole browser window refresh too. That.top
was a missing piece for me on redirects though. – Itinerancy