Name
popup_menu
Synopsis
print $query->popup_menu('name',\@array[,'selected', \%labelhash])
Generates a popup menu.
nameThe name to assign the input to (required).
\@arrayAn array reference listing the menu items. You can also use an anonymous array reference (see example below).
selectedThe menu item to be initially selected (default is first menu item or the item selected in previous queries).
\%labelhashA 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);-onChange=>functionBrowser should execute
functionwhen the user changes the text field-onFocus=>functionBrowser should execute
functionwhen the focus is on on the text field-onBlur=>functionBrowser should execute
functionwhen the focus leaves the text field