Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Display currnet day,moth, and year in combobox separately

 
ashish jadhav
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am creating one application in which i displayed one combobox which contains day(1-31).one combobox contains month.(1-12months). and one combobox shows current year.

when we run application i want to disply initially current day in first combobox,current month in another,and current year in last combobox.if possible help me..
Thanking you
ashish
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please read this
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you should obtain the three values of day, month, and year using something like this



and then when you iterate through the options of your day combo boxes, check if the corresponding value equals currentDay set the selected attribute to true. do the same for the month and year combos


(peace)

 
ashish jadhav
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks omar..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!