aspose file tools*
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
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: 87
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: 87
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: 87


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: 87
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