I am trying to use Google App Script for the first time and want to get data out of a textbox in on a button click (Into variable TC in the second function). I have tried to follow both from Google and online but it seems like all the functions hey use have been decommissioned. Can anyone give me some guidance on this, I don't have any experience with UIs and have been working at this project for several hours.
See simplified code below.
Thank you,
John
function doGet() {
var app = UiApp.createApplication().setTitle('Richardson-Dushmann Calculator');
var Temperature = app.createTextBox().setName("Temperature");
var button = app.createButton('Calculate').setId('Calculate');
var handler = button.addClickHandler(app.createServerHandler("handlerFunction"));
var inputGrid = app.createGrid(1, 3);
var mypanel = app.createVerticalPanel();
inputGrid.setWidget(0, 0, app.createLabel('T = '));
inputGrid.setWidget(0, 1, Temperature);
inputGrid.setWidget(0, 2, app.createLabel(' \xB0C'));
mypanel.add(inputGrid);
mypanel.add(button);
app.add(mypanel);
return app;
}
function handlerFunction(e) {
var app = UiApp.getActiveApplication();
var TC = e.parameter.Temperature;
return app;
}