Run google script web apps in dev mode but not exec mode
I have a script project called displayhtmlfromquerystring,
Script file
function doGet(e){
var html;
if(e.parameter.html)
html=e.parameter.html;
else
html="Error no html";
return HtmlService.createHtmlOutput(html+"<hr/>");
}
I deployed it as a web app, google gave me two links, one ends with "dev" and one ends with "exec".
Running a script with a dev link is fine, but when running with an exec link, the page displays a single word "undefined", I am stuck, can anyone tell me why?
Link my app script https://script.google.com/macros/s/AKfycbyinAHBmjVgKDinY-bCcwQ4bgy87KuibiflG1158qRkBJSSXeMk/exec "
0
user8144578
source
to share
2 answers
The / dev links only work when logged into your google account.
Whenever you make any changes to your code, you must go to Publish> Deploy as Web Application, select the new version, and click Update.
The latest changes will now also be available on the / exec page.
+3
Amit Agarwal
source
to share
It works for me when I use your code:
function doGet(e) { // main function
var html;
if(e.parameter.html)
html=e.parameter.html;
else
html="Error no html";
return HtmlService.createHtmlOutput(html+"<hr/>");
}
0
noogui
source
to share