Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 musing on the Monastery: (15)
As of 2014-07-31 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls