469,331 Members | 4,734 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

dynamic listbox - populate with month/year

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]
Aug 28 '08 #1
6 3041
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

[IMG]

[/IMG]
Aug 28 '08 #2
Dormilich
8,651 Expert Mod 8TB
Well, in this case I recommend using the appendChild() function in combination with the Date object (getMonth(), getYear()).
Aug 28 '08 #3
your post code example, please. I can't coding
Thanks you,
Aug 28 '08 #4
gits
5,390 Expert Mod 4TB
changed thread title ... please always use a meaningful thread title according to the posting guidelines

kind regards
MOD
Aug 28 '08 #5
gits
5,390 Expert Mod 4TB
merged threads - please don't double post ... keep all posts related to one of your problems in one thread ...

kind regards
MOD
Aug 28 '08 #6
Dormilich
8,651 Expert Mod 8TB
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.
Aug 28 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Broder | last post: by
2 posts views Thread by znelson | last post: by
9 posts views Thread by Gianni | last post: by
3 posts views Thread by Miguel Dias Moura | last post: by
4 posts views Thread by igotyourdotnet | last post: by
1 post views Thread by jasydnor | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.