This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Need to populate three drop down lists(for day,month and year) using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Need to populate three drop down lists(for day,month and year) using javascript" Watch "Need to populate three drop down lists(for day,month and year) using javascript" New topic
Author

Need to populate three drop down lists(for day,month and year) using javascript

achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 79
I have three drop down lists using javascript into three html drop down lists . The days list will have values from 1-31 , the month list will have values from 1-12 and the year list will have values from 1900-2005. There is a for loop involved.
vinayak jog
Ranch Hand

Joined: Apr 01, 2011
Posts: 81

Do some coding get error look for answers, don just distribute your assignments
achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 79
I am new to javascript and have tried different tutorials on the web. I know it is a simple for loop in three ways . But i cant do it in javascript.I have done the same in ASP.NET. Still looking for help.
achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 79


And the form tag i wrote onload="addOption_list()"

Also there is an empty drop down list in the html part written as



It didnt work but it sounds logically correct and there is no error in the javascript console.

achuthan mukundarajan
Ranch Hand

Joined: May 30, 2012
Posts: 79
Figured it out myself. The onload event should be written the body tag and my final working code is :

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to populate three drop down lists(for day,month and year) using javascript
 
Similar Threads
How to select a value in the drop down list with value getting from database?
setting default value for a combobox
pass parameter values to url in jsp
dynamic drop down list values
saving preselected drop down value