Check this example for using remote data with JSON:
http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/json.html

Jörn

On Sun, Feb 8, 2009 at 11:53 PM, arnoldroa <mano...@gmail.com> wrote:
>
> Hi, i need to send a json object to the autocompleter. i see this
> example on the demo:
>
>        $("#thickboxEmail").autocomplete(emails, {
>                minChars: 0,
>                width: 310,
>                matchContains: true,
>                highlightItem: false,
>                formatItem: function(row, i, max, term) {
>                        return row.name.replace(new RegExp("(" + term + ")", 
> "gi"),
> "<strong>$1</strong>") + "<br><span style='font-size: 80%;'>Email:
> &lt;" + row.to + "&gt;</span>";
>                },
>                formatResult: function(row) {
>                        return row.to;
>                }
>        });
>
> the emails object var is a object, so
>
> emails = {name: 'aasdfasd', to: 'asdfqweqwe'}
>
> i need just that, the problem is that my mail is on a mysql DB. i dont
> want to send a "one item per line". i want to send a json object. is
> there anyway?

Reply via email to