dynamic listbox - populate with month/year 
August 28th, 2008, 03:51 AM
| | Newbie | | Join Date: Aug 2008
Posts: 4
| | |
i have created following drop down box for displaying year... i want to populate the drop down box upto current year.. and need to write a java script for this .. any pointers in this regard will be very helpful
Code: ( text )
[HTML]<select name=year>
<option value=2008>2008</option>
<option value=2007>2007</option>
<option value=2006>2006</option>
</select>[/HTML]
Last edited by gits; August 28th, 2008 at 08:44 AM.
Reason: added code tags
| 
August 28th, 2008, 03:57 AM
| | Newbie | | Join Date: Aug 2008
Posts: 4
| | | re: dynamic listbox - populate with month/year
i have created following drop down box for displaying month, year... i want to populate the drop down box upto current year.. and need to write a java script for this .. any pointers in this regard will be very helpful   " border="0"> | 
August 28th, 2008, 05:20 AM
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,492
Provided Answers: 10 | | | re: dynamic listbox - populate with month/year
Well, in this case I recommend using the appendChild() function in combination with the Date object (getMonth(), getYear()).
| 
August 28th, 2008, 08:38 AM
| | Newbie | | Join Date: Aug 2008
Posts: 4
| | | re: dynamic listbox - populate with month/year
your post code example, please. I can't coding
Thanks you,
| 
August 28th, 2008, 08:42 AM
|  | Moderator | | Join Date: May 2007 Location: Munich, Germany
Posts: 4,102
Provided Answers: 1 | | | re: dynamic listbox - populate with month/year
changed thread title ... please always use a meaningful thread title according to the posting guidelines
kind regards
MOD
| 
August 28th, 2008, 08:45 AM
|  | Moderator | | Join Date: May 2007 Location: Munich, Germany
Posts: 4,102
Provided Answers: 1 | | | re: dynamic listbox - populate with month/year
merged threads - please don't double post ... keep all posts related to one of your problems in one thread ...
kind regards
MOD
| 
August 28th, 2008, 09:51 AM
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,492
Provided Answers: 10 | | | re: dynamic listbox - populate with month/year Quote: |
Originally Posted by olala123 your post code example, please. I can't coding
Thanks you, | I can't. I don't know your environment. The only thing I can do is guide you in learn coding yourself. So first I recommend reading a Javascript tutorial (see the "offsite links" (sticky post) at top of the Javascript forum). If you have problems understanding this or that topic, I'll be pleased to explain.
|  |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | dynamic drop downs | igotyourdotnet | answers | 4 | December 8th, 2006 08:25 AM | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,702 network members.
|