Google Apps Script Web アプリに少し問題があります。次のスクリプト サンプルは、ドキュメント内に配置すると、Web アプリで完全に機能します。しかし、ブラウザのスタンドアロン アプリとして、エラー メッセージが表示され続けます。「Browser.msgBox (prompt)」をブラウザで動作させるにはどうすればよいですか?
エラー メッセージを確認したい場合は、こちらからアプリにアクセスできます。
// Script-as-app template.
function doGet() {
var app = UiApp.createApplication();
var button = app.createButton('Click Me');
app.add(button);
var label = app.createLabel('The button was clicked.')
.setId('statusLabel')
.setVisible(false);
app.add(label);
var handler = app.createServerHandler('myClickHandler');
handler.addCallbackElement(label);
button.addClickHandler(handler);
return app;
}
function myClickHandler(e) {
var app = UiApp.getActiveApplication();
var label = app.getElementById('statusLabel');
label.setVisible(true);
Browser.msgBox("hello world");//THIS IS MY PROBLEM!!!
app.close();
return app;
}