2021年4月25日星期日

ToggleButton for Google HtmlService

What is the easiest way to get some kind of toggle switch for Google HtmlService?

Google UiApp used to be able to create a simple ToggleButton like the following:

var toggleButton = app.createToggleButton('ON', 'Off').setId('MySwitch');

But UiApp has been deprecated. "Please use HtmlService instead"

I've tried

But found I cannot make them a two-stage item. Then I tried

and was able to get the HTML part working, but moving it to Google HtmlService, I cannot make it work no matter what.

Can someone give me a working Google HtmlService example that contains a two-stage item that I can use to control my output please.

https://stackoverflow.com/questions/67260048/togglebutton-for-google-htmlservice April 26, 2021 at 10:14AM

没有评论:

发表评论