Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
achuthan mukundarajan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 83
MySQL Database Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do some coding get error look for answers, don just distribute your assignments
 
achuthan mukundarajan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured it out myself. The onload event should be written the body tag and my final working code is :

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic