cgi.rb patch for javascript support

E

Eric Schwartz

My apologies if this belongs on ruby-dev; this is my first ruby patch,
so I thought I'd solicit comment here. This patch, when applied to
cgi.rb, allows a programmer to write:

cgi.popup_menu("NAME" => 'name',
"ONCHANGE" => 'alert("somebody changed this popup menu!");',
"VALUES" => [ ['a', 'one'], ['b', 'two'], ['c', 'three'] ])

--- cgi.rb.orig 2003-12-04 15:14:34.000000000 -0700
+++ cgi.rb 2003-12-04 15:38:19.000000000 -0700
@@ -1858,13 +1858,16 @@
values = name["VALUES"]
size = name["SIZE"].to_s if name["SIZE"]
multiple = name["MULTIPLE"]
+ onchange = name["ONCHANGE"]
name = name["NAME"]
else
size = nil
multiple = nil
+ onchange = nil
end

select({ "NAME" => name, "SIZE" => size,
+ "onChange" => onchange,
"MULTIPLE" => multiple }){
values.collect{|value|
if value.kind_of?(String)

Assuming this is okay, where should I send it to get it included upstream?

-=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
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top