Popup Menus
With CGI::Form, popup menus, also referred to as drop-down lists, are single selection lists that expand when the user clicks the icon to the right of the text. Unlike listboxes, popup menus can only return a single selection. Popup menus use the <SELECT> tag with SIZE equal to 1:
<SELECT NAME='State' SIZE=1> <OPTION>CA <OPTION>WA <OPTION>OR <OPTION>NV <OPTION>AZ </SELECT>
Using CGI::Form, a call to the method popup_menu, is shown here:
@states=( `CA', `WA', `OR', `NV', `AZ' ); $q->popup_menu( -name=>'State', -values=>\@states, -default=>'CA' );