Shul: Fetching the value from a textbox

Shoes.setup do
  gem 'shul'

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)"/>
XML { 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 of Shul