print $query->scrolling_list('list_name',
['eenie','meenie','minie','moe'],
['eenie','moe'],5,'true');
-or-
print $query->scrolling_list('list_name',
['eenie','meenie','minie','moe'],
['eenie','moe'],5,'true',
\%labels);
-or-
print $query->scrolling_list(-name=>'list_name',
-values=>['eenie','meenie','minie','moe'],
-default=>['eenie','moe'],
-size=>5,
-multiple=>'true',
-labels=>\%labels);
scrolling_list
creates a scrolling list.
- Parameters:
-
-
The first and second arguments are the list name (-name) and values
(-values). As in the popup menu, the second argument should be an array
reference.
-
The optional third argument (-default) can be either a reference to a list
containing the values to be selected by default, or can be a single value
to select. If this argument is missing or undefined, then nothing is
selected when the list first appears. In the named parameter version, you
can use the synonym ``-defaults'' for this parameter.
-
The optional fourth argument is the size of the list (-size).
-
The optional fifth argument can be set to true to allow multiple
simultaneous selections (-multiple). Otherwise only one selection will be
allowed at a time.
-
The optional sixth argument is a pointer to an associative array containing
long user-visible labels for the list items (-labels). If not provided, the
values will be displayed.
When this form is processed, all selected list items will be returned as a
list under the parameter name 'list_name'. The values of the selected items
can be retrieved with:
@selected = $query->param('list_name');
JAVASCRIPTING: scrolling_list
recognizes
the following event handlers:
-onChange, -onFocus, and -onBlur. See textfield
for the description of when these handlers are
called.