Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Manage Date of Birth dynamically in javascript  RSS feed

 
Omkar G. Deshmukh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

i ma designing on form in jsp. in that i am having one feild Date of Birth in that i want three drop down boxes one for month another for day and last for year.

i dont want to hardcode this details in my jsp file.beacause it will make my code lenghty... so kindly give me the solution for this.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not join the modern era and use a date-picker rather than three dropdowns?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36463
461
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use a loop. Even better you could create a "model" object in your servlet that has logic to create that list. Then the JSP refers to that in a loop.
 
Omkar G. Deshmukh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi team,

i used javascipt for this in that i used for loop.
then i created element for each iteration.

Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!