Created
August 3, 2016 17:14
-
-
Save scottswaaley/d9a258ab80180e12ab3cd6e0f562cda2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
var app = UiApp.createApplication(); | |
var formPanel = app.createFormPanel(); | |
var verticalPanel = app.createVerticalPanel(); | |
var label1 = app.createLabel("Enter a thing here: "); | |
var textBox1 = app.createTextBox().setName('textBoxResult1'); | |
var label2 = app.createLabel("Enter a feeling here: "); | |
var textBox2 = app.createTextBox().setName('textBoxResult2'); | |
var submitButton = app.createSubmitButton("Click to submit"); | |
verticalPanel.add(label1).add(textBox1).add(label2).add(textBox2).add(submitButton); | |
formPanel.add(verticalPanel); | |
app.add(formPanel); | |
return app; | |
} | |
function doPost(e) { | |
var app = UiApp.getActiveApplication(); | |
var label1 = app.createLabel("I love to eat " + e.parameter.textBoxResult1 + " on tuesdays."); | |
var label2 = app.createLabel("It makes me feel " + e.parameter.textBoxResult2 + "."); | |
app.add(label1).add(label2); | |
return app; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment