You can't call Ruby from a web page. You have to use something like 
Javascript.

You can insert Ruby programs in an html file to help build it but it 
will disappear before the page gets sent.

You can get Ruby to build you web page actions but they will be in 
Javscript at the time they arrive at the browser.

Rails has classes to build Javascript.
-- 
Posted via http://www.ruby-forum.com/.