• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrieved selected value from jquery autocomplete.

 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, with JQuery 1.9.2 and JSP, I created an autocompelte input box.
When I selected a text from the input box, I don't know how to extract the input text and append it to the hidden field.

Here is my the autocomplete jquery scripts:




jsp code:



I've been searched google for 2 days, but I can't anything that suits my case.

Any suggestion and pointers are very appreciated.
Thanks
Sam
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post nicely formatted HTML as sent to the browser. Showing us the server-side markup with JSP custom tags isn't particularly useful for debugging client-side issues.

In other words, we have no idea what " <form:hidden path="suburb" /> " turned into when sent to the browser. That's what we need to see.
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have resolved this issue. But when I select the item and click on the one on in the list, the selected value didn't get pick up to the input box.

Here is the code with "select" clause:



What need to be corrected in order the selected item get pick up by mouse-click in the list?

Thanks
Sam
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just found out changing false to true in the select clause fixed the issue.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic