Пользователь через пользовательское меню открывает модальный диалог < /li>
< li> Пользователь нажимает кнопку на модальном диалоговом окне < /li>
Кнопка нажима Полем Но ... предупреждение отображается дважды. Вот код:
custom-menu.gs
Код: Выделить всё
function onOpen() {
SpreadsheetApp.getUi().createMenu('custom menu')
.addItem('button 1','someFunction')
.addToUi();
}
Код: Выделить всё
function someFunction() {
const htmlOutput = HtmlService.createHtmlOutputFromFile("html-file");
SpreadsheetApp.getUi().showModalDialog(htmlOutput, "Some Title");
}
function someFunc1() {
SpreadsheetApp.getUi().alert("someFunc1() has been called.")
}
Submit
function submit() {
google.script.run.someFunc1();
}
< /code>
Я полностью сбит с толку. Любая помощь будет очень оценена. Спасибо заранее!
Подробнее здесь: https://stackoverflow.com/questions/794 ... tml-dialog
Мобильная версия