Did you try reading the manual? Mr. Stein has done a good job of
documenting the module. Al
Todd
http://search.cpan.org/dist/CGI.pm/CGI.pm
<snip>
CREATING A POPUP MENU
print popup_menu('menu_name',
['eenie','meenie','minie'],
'meenie');
-or-
%labels = ('eenie'=>'your first choice',
'meenie'=>'your second choice',
'minie'=>'your third choice');
%attributes = ('eenie'=>{'class'=>'class of first choice'});
print popup_menu('menu_name',
['eenie','meenie','minie'],
'meenie',\%labels,\%attributes);
-or (named parameter style)-
print popup_menu(-name=>'menu_name',
-values=>['eenie','meenie','minie'],
-default=>'meenie',
-labels=>\%labels,
-attributes=>\%attributes);
popup_menu() creates a menu.
1. The required first argument is the menu's name (-name).
2. The required second argument (-values) is an array reference
containing the list of menu items in the menu. You can pass the method
an anonymous array, as shown in the example, or a reference to a named
array, such as "\@foo".
3. The optional third parameter (-default) is the name of the
default menu choice. If not specified, the first item will be the
default. The values of the previous choice will be maintained across
queries.
4. The optional fourth parameter (-labels) is provided for people
who want to use different values for the user-visible label inside the
popup menu and the value returned to your script. It's a pointer to an
associative array relating menu values to user-visible labels. If you
leave this parameter blank, the menu values will be displayed by
default. (You can also leave a label undefined if you want to).
5. The optional fifth parameter (-attributes) is provided to assign
any of the common HTML attributes to an individual menu item. It's a
pointer to an associative array relating menu values to another
associative array with the attribute's name as the key and the
attribute's value as the value.
When the form is processed, the selected value of the popup menu can be
retrieved using:
$popup_menu_value = param('menu_name');
</snip>