aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Jquery /Ajax returning multiple fields from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Jquery /Ajax returning multiple fields from servlet" Watch "Jquery /Ajax returning multiple fields from servlet" New topic
Author

Jquery /Ajax returning multiple fields from servlet

Mike Skit
Greenhorn

Joined: Feb 09, 2008
Posts: 23
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

Return a JSON array.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mike Skit
Greenhorn

Joined: Feb 09, 2008
Posts: 23
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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

Joined: Dec 02, 2008
Posts: 5
Bear Bibeault wrote:Return a JSON array.

Use javascript foreach loop to traverse through your result array.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jquery /Ajax returning multiple fields from servlet