This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JQuery, JSON and getting the selected value

 
Dave Anderson
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JQuery, autocomplete, JSON, I am successfully able to get a list of items from a database call.

I am also able to highlight the user's selection with the .change method; however, I cannot figure out how to get the actual value a user selects from the list, and this is where I'd like help.


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is set as the value of the input element that you instrumented as the autocompleter. You can also grab it during an autocompleteselect event.

[Covered in section 11.4 of jQuery in Action for those with the book.]
 
Dave Anderson
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic