- Learning Google Apps Script
- Ramalingam Ganapathy
- 68字
- 2021-07-16 12:40:04
Creating a modal dialog
To create a modal dialog, which prevents the user from updating anything in the spreadsheet or document, update the code in the Code.gs
file as shown here:
function onOpen(){ DocumentApp.getUi() .createAddonMenu() .addItem("Show Dialog", "showDialog") .addToUi(); } function showDialog() { var html = HtmlService .createHtmlOutputFromFile('Index'); DocumentApp.getUi() .showModalDialog(html, 'Greeting'); }
Go to Add-ons | Chapter 2 | Show Dialog and a modal dialog will pop up:

推薦閱讀
- Mastering Ext JS(Second Edition)
- scikit-learn Cookbook
- 新一代通用視頻編碼H.266/VVC:原理、標準與實現
- Machine Learning with R Cookbook(Second Edition)
- R語言數據可視化之美:專業(yè)圖表繪制指南
- Mastering OpenCV 4
- HTML5+CSS3+JavaScript Web開發(fā)案例教程(在線實訓版)
- Scientific Computing with Scala
- Jenkins Continuous Integration Cookbook(Second Edition)
- 青少年信息學競賽
- Node Cookbook(Second Edition)
- Swift 4從零到精通iOS開發(fā)
- Python機器學習之金融風險管理
- Clojure Polymorphism
- Instant Automapper