javascript hooks for popup_menu in cgi.rb?

E

Eric Schwartz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top