473,659 Members | 3,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dynamic listbox - populate with month/year

4 New Member
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 3233
olala123
4 New Member
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,658 Recognized Expert Moderator Expert
Well, in this case I recommend using the appendChild() function in combination with the Date object (getMonth(), getYear()).
Aug 28 '08 #3
olala123
4 New Member
your post code example, please. I can't coding
Thanks you,
Aug 28 '08 #4
gits
5,390 Recognized Expert Moderator Expert
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 Recognized Expert Moderator Expert
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,658 Recognized Expert Moderator Expert
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

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

Similar topics

4
7299
by: Crystal | last post by:
Ok, I know this sounds weird, but it's really bugging me. I have a few list boxes on my form (basic pick a month, year, state stuff) and you can only choose one value. I need to be able to run a script to pick out those boxes and request the value and then response.write the value to a URL that I am creating. The script actually sends an email to me that contains a link to the form that the user filled in and populates the form with...
3
1959
by: Broder | last post by:
Hi there, I am currently running into a somewhat weired problem and hope that this NG is able to help ;-) I have a table in a MSSQL Server in which there is one Column that stores a date. The Format is 04.03.2004 Now I want to populate a Listbox but only with the year from that Column. So if I have lets say 10 entries with *.*.2004 and 5 with *.*.2003 I just want
2
5850
by: znelson | last post by:
I'm looking for a way to transform the contents of n source tables into a single destination table. This by itself is no problem. However, the name of the source tables change, so I'll need to base the transform task on a global variable that I can update via external code. Not sure how to do that. I'm ok with executing the package 10 times if there's 10 source tables. The last unknown piece is modifying the query used for the...
9
2141
by: Gianni | last post by:
I have to insert in a html select the last 10 years <select name="year" onChange="month()" size=5> <option value="1994">1994</option> <option value="1995">1995</option> <option value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option>
6
4880
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on a table called COURSES. This table has 2 fields CATEGORY_ID, COURSE_NAME. The CATEGORY_ID is a FK in COURSES and a PK in CATEGORIES. I want to populate the course list box based on any category(s)
3
14216
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists. Each group of Drop Down Lists include 3 Drop Down Lists for date such as: DAY, MONTH, and YEAR. I don't want to insert the values and text to each drop down list. So i want to create a script that populates a certain Drop Down List with certain values when page loads such as:
4
1124
by: igotyourdotnet | last post by:
i have 2 drop downs that have months in them such as 1/1/2005 and 1/31/2005 I need to my starting month drop down to be a month behind the end of month so something like this: if month ending = 1/31/2006 I need start month = 12/31/2005 how can I do thi? is it possible?
1
3749
by: skyson2ye | last post by:
Hi, guys: I have written a piece of code which utilizes Javascript in PHP to create a three level dynamic list box(Country, States/Province, Market). However, I have encountered a strange problem, and I have spent three days trying to debug but to no avail. Everything is OK when there are only two dependent list boxes, but when adding the third child list box, a problem appears: if I populate the third box only with the value: new...
1
1702
by: jasydnor | last post by:
Hi, New to the forums and have a question. I've only been developing for about five months now so I apologize if this seems oversimplistic....I am writing a program on an idea I had on a whim. It's based on the fact that a store (Wal-Mart) is laid out in a logical manner and you can shop efficiently if your shopping list is in order. What I have are two listboxes, the left one contains all the items I might buy and as you double click on...
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8748
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8628
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.