I'm new with Google Apps Script Programming. I have piece mealed this code from other answers on S.O. Am I doing something wrong? I call the msg(s) routine from Google sheet, and nothing pops up. Any help is appreciated. Thx.
function msg(s) { //*************************************************************
var app = UiApp.getActiveApplication();
var pnl = app.createHorizontalPanel().setStyleAttribute('zIndex', '1') ;
var text = app.createTextArea().setName("text");
var handler = app.createServerHandler("count").addCallbackElement(text);
pnl.add(text);
pnl.add(app.createButton("Count", handler));
pnl.add(app.createLabel("0 characters").setId("label"));
return pnl;
}
function count(eventInfo) {
var app = UiApp.createApplication();
app.getElementById("label").setText(eventInfo.parameter.text.length+" characters");
return app;
}