Skip to content

Instantly share code, notes, and snippets.

@scottswaaley
Created August 3, 2016 17:11
Show Gist options
  • Save scottswaaley/781e7a3f36f9e69404331eb1f5106d7e to your computer and use it in GitHub Desktop.
Save scottswaaley/781e7a3f36f9e69404331eb1f5106d7e to your computer and use it in GitHub Desktop.
function doGet() {
var app = UiApp.createApplication();
var button = app.createButton("Click Me!");
button.addClickHandler(app.createServerHandler("handlerFunction"));
app.add(button);
return app;
}
function handlerFunction(eventInfo) {
var app = UiApp.getActiveApplication();
var label2 = app.createLabel("Yo bro, why'd you click me?");
app.add(label2);
return app;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment