I have the following code which should 1. Give user a choice of actions 2. Based on these go to the specified script
I have the following issues 1. The Submit button needs clicking twice after selection 2. Only one value can be chosen, to choose another the form must be reloaded from scratch (ie: reload button does not work, only go etc) Any assistance appreciated Script follows #!/usr/bin/perl -wT use CGI qw/:standard/; use strict; use CGI::Carp qw/warningsToBrowser fatalsToBrowser/; ## sub to print submit button; sub run_cmd1 {return print span({-class=>'place_cmd'},submit(-name=>'act', -value=>shift)),p}; ##selection hash; my %commands1=(1=>['Choose Operation',''],2=>['correspondence',''],3=>['file management',''],4=>['filing'.''],5=>['Finance','/cgi-bin/finance.pl'],6=>['Contacts','/cgi-bin/contacts.pl'],7=>['Telephone Logging',''],8=>['Timesheets','/cgi-bin/timesheet.pl'],9=>['Calendars','']); print header(); &head1; sub head1 { ## transalation of drop-down list to actions; print start_html(-style=>'/proj.css'); my $command; $command=param('select'); if (param('select')){ foreach my $keys (keys %commands1){ if (param('select') eq $keys){ $command= $commands1{$keys}[1];}}} print start_multipart_form (-method=>'POST',-action=>$command), "user",br,textfield(-name=>'user',-size=>'15'),br, "password",br,password_field(-name=>'pass'),br; my @select; my %select; foreach my $keys (sort(keys %commands1)){push (@select,$keys); $select{$keys}=$commands1{$keys}[0] } ## select pop_up menu; print popup_menu(-name=>'select',-values=>[EMAIL PROTECTED],-default=>$commands1{1}[0,-labels=>\%select); run_cmd1('Chooser'); print end_form; print end_html} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>