• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jquery /Ajax returning multiple fields from servlet

 
Mike Skit
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using the "Autocompleter" using Jquery / jsp/servelt.
The question is :
As soon as the user has selected the word from the Autocompleter,
I need to return multiple fields from a Servlet/server to the client.

Jsp1 ->ajax/jquery(selected word) -> servlet1 ->Jsp1(Mutiple fields based on the selected word.)

Actually the returned fields is to populate a table with a few columns that need to be refreshed based on the selection made in the Autocompleter dropdown.


Thanks in advance,
-Mike.
A code example will be really appreciated.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Return a JSON array.
 
Mike Skit
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.. actually i tried that..
it did correctly return the json array...
I am able to update if there is only one field to be updated..

But, there are 2 questions from this point..
1)How do i update if there are multiple fields to be updated.
2)What if i have to update(sort) the table based on what the user selects in the autocompleter..

Any code example will be great..

Thanks for the quick response..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us your code. You keep asking for code, but that's not the way things work around here. Post your code and we'll help you get it working. Be sure to use UBB code tags.
 
Uzbek Jon
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Return a JSON array.

Use javascript foreach loop to traverse through your result array.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic