Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I would like it to autoselect the first item in the combo box rather than having to click on the arr

 
Anitha Kuchana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a one drop down box . and i have a one text box in that text box i entered date and i wriitten a on focus event for that text for that i written a java script method in that i checked given date is greater than the current date at that time the combo box value as 00:00 default value .what can i do .I would like it to autos elect the first item in the combo box rather than having to click on the arrow .what code wriiten in javascript.please any one help me.
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer this link.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need any JavaScript. Simply put the selected attribute on the option element you want to be initially selected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic