Shul: Fetching the value from a textbox

Shoes.setup do
  gem 'shul'
end

require 'shul'

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').value)"/>
</app>
XML

Shoes.app {Shul.new self, xml}

The above example will display an alert box with the value of the textbox when the button is pressed.

Running the example

On my Linux box I typed the following:

/home/james/.shoes/federales/shoes test10.rb

Screenshot

Screenshot of Shul

Resources