Shul: Fetching the value from a textbox
require 'shul'
require 'green_shoes'
xml =<<XML
<app title="Hello World">
<textbox id='tb' value='empty' size='40'/>
<button id="yes1" label="Yes" oncommand="alert(doc.element_by_id('tb').text)"/>
</app>
XML
Shul::Main.new Shoes, xml
The above example will display an alert box with the value of the textbox when the button is pressed.
Screenshot
Resources
- Introducing the Shul gem http://www.jamesrobertson.eu/snippets/2017/aug/08/introducing-the-shul-gem.html
- shul https://rubygems.org/gems/shul
shul shoes gem