Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Drop Down Year List

by imrags (Monk)
on Aug 21, 2009 at 09:12 UTC ( #790294=note: print w/ replies, xml ) Need Help??


in reply to Drop Down Year List

I have done something similar in a html table (using CGI)
Here's the part of code, hope it helps:

##########to set date/year code ############ @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun); ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek +, $dayOfYear, $daylightSavings) = localtime(); $year = 1900 + $yearOffset; my @years = ($year, $year+1,$year+2); ###################################################### ########To have the years, and use them############### my @years = (2006,2007,2008,2009); my $query = new CGI; ####Other cgi code#### print $query->Tr( $query->popup_menu( -name => 'syear', -values => \@years, -default => $eyear, -labels => @years, ) );
Depending on where you have the problem, you can use the code.
Raghu


Comment on Re: Drop Down Year List
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://790294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2015-07-02 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (28 votes), past polls