I have a problem passing parameters from a doget() to a template im using with Google Apps Script. Here's an code excerpt:
The .gs file:
function doGet(request) {
var t = HtmlService.createTemplateFromFile('index');
t.line = findCell(request)
t.parameters = request
return t.evaluate().setSandboxMode(HtmlService.SandboxMode.IFRAME);
}
The .html file:
<?= parameters.id ?>
If I then go to this URL (of the actual app) https://script.google.com/a/macros/bucerius-alumni.de/s/AKfycbwvpTfB8KeMIUex4XUiWyI5qHfDbrNb-ZUHbgFJcsikFjuRo9WV/exec?id=1 and pass the parameter id=1 it renders out 'undefined'.
I don't really get it. Can anybody help me please? :-)
Thank you all Alex
HtmlService.SandboxMode.NATIVE
instead ofIFRAME
? – Dayton Wang