December 1998
Beginner to intermediate
674 pages
40h 41m
English
popup_menu
print $query ->popup_menu('name', \@array [,’selected', \%labelhash ])
Generates a popup menu.
The name to assign the input to (required).
An array reference listing the menu items. You can also use an anonymous array reference (see example below).
The menu item to be initially selected (default is first menu item or the item selected in previous queries).
A hash reference listing labels for each menu item. Default is menu item text. For example:
%labels = ('UPS'=>'United Parcel Service (UPS)',
'FedExO'=>'Federal Express Overnight - 10AM delivery',
'FedExS'=>'Federal Express Standard - 2PM delivery',
'FedEx2'=>'Federal Express 2nd Day Delivery');
print $query->popup_menu('delivery_method',
['UPS', 'FedExO', 'FedExS', 'FedEx2'],
'FedExO',
\%labels);
Using named parameters, the syntax is:
print $query->popup_menu(-name=>'name', -values=>\@array, -default=>'selected', -labels=>\%labelhash, -onChange=>function, -onFocus=>function, -onBlur=>function);
Read now
Unlock full access