Thanks Jörn I appreciate you taking the time to help me out. Steve
-----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jörn Zaefferer Sent: Monday, January 12, 2009 12:18 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: autocomplete JSON support is still a bit rough. Here is an example, the parse-option is something we want to improve a lot in the future: http://jquery.bassistance.de/autocomplete/demo/json.html Jörn On Mon, Jan 12, 2009 at 4:34 PM, rhythmicde...@gmail.com <rhythmicde...@gmail.com> wrote: > > Hi all new to the group and jQuery in general. > > I just installed the very cool autocomplete plugin yesterday and have > it working in the following scenarios: > > $("#example").autocomplete(data); > Where data is a local string as shown in the examples. > > $("#example").autocomplete('get_data.php'); > Where the data is retrieved from a PHP page that calls a mysql > database. > > Now I am trying to get it to work inside of an app built in CakePHP. I > have data as a JSON object with the following structure: > > var data = {"0000000017":"angel hair","0000000016":"basmati > rice","0000000021":"black beans"} > > I thought that I could just pass this to autocomplete but nothing > happens. Meaning the autocomplete field does do anything at all on the > UI. > > My question is: what is the correct way to handle a JSON object with > autocomplete? Do I need to enumerate the values into a string? That > seems a little hacky. Just looking for the correct methodology. > > Thanks. >