[jQuery] Re: autocomplete-comma delimeter string from servlet

2009-02-03 Thread thomas.confuse
erm. the ouput still isnt what is expected. The servlet that i call will output as "a,b,c,d" (exclude double quotes) here is the sample code: $("#businessCity").autocomplete("OrganizationCityList?limit=10", { formatResult: function(row,position,total,searchTerm) { // serv

[jQuery] Re: autocomplete-comma delimeter string from servlet

2009-02-03 Thread thomas.confuse
The solution the issue. formatItem: function(row,position,total,searchTerm) { // server sends rows e.g. kelantan, kedah return row.toString().split(',')[0]; } On Feb 3, 10:33 pm, "thomas.confuse" wrote: > Hi, Eric. > Thanks for t

[jQuery] Re: autocomplete-comma delimeter string from servlet

2009-02-03 Thread thomas.confuse
Hi, Eric. Thanks for the response. but i somehow kinda "bump" into the another way of getting it done. trial and error . :-) Its done using formatline option in autocomplete. I will paste the code here very soon. On Feb 3, 10:14 pm, Eric Garside wrote: > I'm not sure what kind of data autoco

[jQuery] Re: autocomplete-comma delimeter string from servlet

2009-02-03 Thread Eric Garside
I'm not sure what kind of data autocomplete accepts, as I'm not familiar with the plugin, but I assume an array of values will work. If your Java servlet is returning "a, b, c, d" as your value string, call: var servletResponse = "a, b, c, d"; // Or however you get the value servletResponse = se