in reply to Populating CGI popup_menu via DBI
Though I wouldn't worry too much about the time efficiency here -- if you really find yourself needing to worry about the extra time looping over the hash twice, then your hash is big enough that the client browsers would probably have trouble parsing/rendering the html....$sth_menu->execute(); my @vals; while (my $ref = $sth_menu->fetchrow_arrayref()) { $menu{$$ref[0]} = $$ref[1]; push @vals, $$ref[0]; } $cgi->popup_menu( -name => 'external_database_id', -values => \@vals, -labels => \%menu );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Populating CGI popup_menu via DBI
by Itatsumaki (Friar) on May 30, 2003 at 14:10 UTC | |
by KPeter0314 (Deacon) on May 30, 2003 at 14:34 UTC |