[Buffalo-pm] CGI Dynamic Content Drop-Down...

Kevin Christopher bpm at binarymojo.net
Mon Mar 8 11:22:37 CST 2004


The CGI.pm module should provide a way for you to populate a
drop down list with readdir().

You should be able to do something like:

my @dir_results = readdir(DIR);
...

print $cgi->popup_menu(
    -name=>'directory',
    -values=>\@dir_results,
);
...

Kevin C.

>
> Mongers,
>
> I need to create a drop down list that will contain options, which
> will include all the files read from a directory. Obviously, things
> are added and deleted in the directory, and I need the drop down to
> reflect and be in tandem with the state of the directory. I've checked
> out a lot of docs and have only found hard coded option examples. Any
> thoughts/pointers? Thanks.
>
> -Dan
>
>
> ---------------------------------
> Do you Yahoo!?
> Get better spam protection with Yahoo! Mail






More information about the Buffalo-pm mailing list