[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

javascript hooks for popup_menu in cgi.rb?

Eric Schwartz

12/2/2003 10:03:00 PM

I've been using cgi.rb to generate HTML for a while now, and I quite
like it, but there appears to be no support for a number of javascript
hooks, such as onChange for popup menus. Is there an easy way to
tweak them into existence, or should I just write some patches for
cgi.rb and submit them?

Here's what I'm trying to do:

cgi.popup_menu('NAME' => 'myname',
'onChange' => "alert('Somebody selected an index!');",
'VALUES' => menu_contents)

As a quick inspection of the cgi.rb source shows, popup_menu does not
pass the onChange parameter to select(). What's the most ruby-ish way
around this?

-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.