473,322 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

drop downs

3
HI
I have three drop downs.One for years(say ddlYear),one for months(say ddlMon) and the last one for no.of days(say ddlDays)
'ddlYear' dropdown is populated with years from 1900 to 2100.
'ddlMon' drop down is pouplated with months.
When i select year and month from ddlYear and ddlMon, i wan the drop down ddlDays to be populated with corresponding no.of days.
(Including the case of leap year also)
Can anyone help me to get this...using javascript


Thanks in advance
May 24 '07 #1
2 1101
acoder
16,027 Expert Mod 8TB
What have you managed so far?

The days would be at least 28. You can add and delete the last 1, 2 or 3 options depending on the month and year.

Use the Date object to determine the days. You can do this by setting the date to the 31st. The date will automatically roll over to the next month if the month has less than 31 days. From that, you can determine the number of days in the current month. This is if you want to do it automatically for every month, otherwise you could easily check manually for each month. April, June, September and November have 30. The rest 31, expect February. For February, you should use the above method. If the date changes to the 3rd of March, you know there's 28 days and if it's the 2nd of March there are 29 days in that year.

To add/delete options, see link
May 24 '07 #2
mrhoo
428 256MB
Call the date adjuster code acoder described with the date select element's onfocus event, or the onchange events of both the year and month selects.
May 24 '07 #3

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

Similar topics

46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
1
by: Martial Spirit | last post by:
Hello- I was amazed at the suckerfish drop-downs from AListApart.com. They work great except for one thing, if I position the drop-downs over an iframe element, on mouseover the menus disappear....
8
by: Kim14 | last post by:
Help! I am trying to create a webpage and it would be obvious to anyone who reads my source code (it's a mess) that I created it using a template. I know almost nothing about webpages, but am...
1
by: Joe Dunleavy | last post by:
Hi Guys, Hopefully some one will have come across this issue already. I have a DataGrid inside a Div where a scroll bar displays once a certain height is meet --> <div id="dvSales"...
2
by: Woody Splawn | last post by:
I have a question about technique with regard to filling drop downs. I have a Winform that has several different tabs and tables associated with it. In an effort to keep the load time small I...
3
by: CSharpguy | last post by:
I have 3 drop downs that are populated from the databasem 4 of my web pages need to have this drop down, how can I trap the selection made in the drop down and popuate my grid on my form?
2
by: John | last post by:
I have CSS drop down navigatoon bar and it works fine. However, when I have page where I have an <embed - needed to show a PDF file, such as: <embed src="Security.pdf" width="900"...
0
by: ehsanen | last post by:
I have some text boxes and drop downs on my web page and now i want to put a button in my webpage that when the user clicked the buton the page itself add another row of textboxes and drop downs , in...
2
by: laredotornado | last post by:
Hi, If any of you have a Google home page ... http://www.google.com/ig you'll notice that when you click on the drop down arrow graphic for each module, there is a drop down menu that appears....
1
by: JackInDaBox | last post by:
Hello, I am new to this and have run into a small problem. I am using the Ajax toolkit with VS 2005 to fill some drop downs through a web service and it works great. All of the cascading drop...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.