D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
CGI
/
HtmlExtension
/
Filename :
popup_menu-i.yaml
back
Copy
--- !ruby/object:RI::MethodDescription aliases: - !ruby/object:RI::AliasName name: scrolling_list block_params: comment: - !ruby/struct:SM::Flow::P body: Generate a Select element as a string. - !ruby/struct:SM::Flow::P body: <tt>name</tt> is the name of the element. The <tt>values</tt> are the options that can be selected from the Select menu. Each value can be a String or a one, two, or three-element Array. If a String or a one-element Array, this is both the value of that option and the text displayed for it. If a three-element Array, the elements are the option value, displayed text, and a boolean value specifying whether this option starts as selected. The two-element version omits either the option value (defaults to the same as the display text) or the boolean selected specifier (defaults to false). - !ruby/struct:SM::Flow::P body: The attributes and options can also be specified as a hash. In this case, options are specified as an array of values as described above, with the hash key of "VALUES". - !ruby/struct:SM::Flow::VERB body: " popup_menu("name", "foo", "bar", "baz")\n # <SELECT NAME="name">\n # <OPTION VALUE="foo">foo</OPTION>\n # <OPTION VALUE="bar">bar</OPTION>\n # <OPTION VALUE="baz">baz</OPTION>\n # </SELECT>\n\n popup_menu("name", ["foo"], ["bar", true], "baz")\n # <SELECT NAME="name">\n # <OPTION VALUE="foo">foo</OPTION>\n # <OPTION VALUE="bar" SELECTED>bar</OPTION>\n # <OPTION VALUE="baz">baz</OPTION>\n # </SELECT>\n\n popup_menu("name", ["1", "Foo"], ["2", "Bar", true], "Baz")\n # <SELECT NAME="name">\n # <OPTION VALUE="1">Foo</OPTION>\n # <OPTION SELECTED VALUE="2">Bar</OPTION>\n # <OPTION VALUE="Baz">Baz</OPTION>\n # </SELECT>\n\n popup_menu("NAME" => "name", "SIZE" => 2, "MULTIPLE" => true,\n "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"])\n # <SELECT NAME="name" MULTIPLE SIZE="2">\n # <OPTION VALUE="1">Foo</OPTION>\n # <OPTION SELECTED VALUE="2">Bar</OPTION>\n # <OPTION VALUE="Baz">Baz</OPTION>\n # </SELECT>\n" full_name: CGI::HtmlExtension#popup_menu is_singleton: false name: popup_menu params: (name = "", *values) visibility: public