【发布时间】:2013-08-30 08:37:32
【问题描述】:
Mypage.html
<div class="seven"><button onClick="Submit()">submit</button> </div>
<script type="text/javascript">
function submit() {
google.script.run.scores(document.forms[0]);
}
</script>
....
Javascript.gs
function scores(form){
Logger.log("I am called")
}
上面的代码完美运行,但是每次单击按钮时,我都希望 HTML 模板化/部署的网页也加载/重新加载/刷新...
我尝试添加
google.script.run.scores(document.forms[0]); (continued from above code, hence line repeated))
google.script.host.refresh (basically got the idea from host.close)
google.script.host.reload
google.script.host.load
请有人帮我获取正确的代码,通过该代码的 onClick 按钮调用分数函数(目前正在工作)以及刷新页面。
注意:我希望它刷新,原因是 - 在提交时,数据被推送到 GSheet,在刷新时再次在下拉列表中调用......
提前谢谢....
【问题讨论】:
标签: html google-apps-script google-docs google-docs-api google-caja