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

howto initial select in option ?

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi good day,

if i have an option as show


and i would like to set the index from very beginning for the option(eg nload)

how to i set it ? say if i would like to set value3 as default selected item
in javascript, can someone please show me ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
eric , it must use a for loop to check the value? we can't set it by just giving the value ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try?

Eric
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
eric, i try on this basic sample, but i can't call the value


it give me error "options is null or not an object"

what mistake occur in my code ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you eric for the example
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic