Quoting Tim Howell <[EMAIL PROTECTED]>:

> This isn't strictly a CGI::App question, but I know that a lot of us are
> using HTML::Template, so here goes: is there a good way to set the
> initial value in an HTML select using HTML::Template parameters?  I've
> got a select with 100 options (integers 0-100), and I'm looking for a
> simple way to populate it from the DB that's driving this app.
>  
> Ideas?


Hello Tim,

   There are several different ways to do this.  One way is to use the 
popup_menu() method provieded in the CGI.pm module to generate the HTML for a 
pull down menu.  See http://www.perldoc.com/perl5.8.0/lib/CGI.html#CREATING-A-
POPUP-MENU for more info.
   
Another way is to simply put the default option as the first one in the list.  
This way you don't need to parse the list of options to have one selected.


-spencer christensen
[EMAIL PROTECTED]

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to