Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
# # PROGRAM: popup_menu.cgi # # PURPOSE: Demonstrate (1) how to create a popup_menu form and # (2) how to determine the value selected by the user. # # Created by alvin alexander, devdaily.com. # #-----------------------------------# # 1. Create a new Perl CGI object # #-----------------------------------# use CGI; $query = new CGI; #----------------------------------# # 2. Print the doctype statement # #----------------------------------# <style> body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } </style> </body> print $query->header; print $query->h3("x"); #----------------------------------------------------# # 3. Start the HTML doc, and give the page a title # print $query->start_html('My popup_menu.cgi program'); my @arr = qw(pasta hamburger salad pierogi chicken_cutlet); if (!$query->param) { print $query->start_form; print $query->h4('Select a dinner entree:'); print $query->popup_menu(-name=>'entrees', -values=>[@arr], -default=>'Veggies'); } print $query->end_form; my @arr = qw(cheese_cake cannoli apple_pie); if (!$query->param) { print $query->start_form; print $query->h3('Select a desert entree:'); print $query->popup_menu(-name=>'deserts', -values=>[@arr], -default=>'Veggies'); } print $query->end_form; print $query->end_html;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: add css to html code
by huck (Prior) on Apr 20, 2017 at 22:38 UTC | |
by Anonymous Monk on Apr 21, 2017 at 02:06 UTC | |
Re: add css to html code
by GotToBTru (Prior) on Apr 21, 2017 at 12:50 UTC | |
by Anonymous Monk on Apr 21, 2017 at 18:15 UTC | |
Re: add css to html code
by Corion (Patriarch) on Apr 20, 2017 at 19:16 UTC | |
by Anonymous Monk on Apr 20, 2017 at 19:31 UTC | |
by Corion (Patriarch) on Apr 20, 2017 at 19:48 UTC |