Looks like a typo in your parse implementation:  value: row.aname,
should be  value: row.name,

Jörn

On Wed, Sep 3, 2008 at 8:32 AM, foxtrot <[EMAIL PROTECTED]> wrote:
>
> Oops, sorry aboute the missing code....
>
> $(document).ready(function(){
>        $("#client").autocomplete("data.json", {
>                parse: function(data) {
>                        return $.map(eval(data), function(row) {
>                                customers = data;
>                                return {
>                                        data: row,
>                                        value: row.aname,
>                                        result: row.name
>                                }
>                        });
>                },
>                minChars: 2,
>                width: 263,
>                formatItem: function(item){
>                        return item.name;
>                }
>        })
> });
>
> the html is just a input-field, and the json have this structure:
>
> {
>        customers:[
>                {
>                        "name": "A",
>                  "project":[
>                                {"name": "project1"},
>                                {"name": "project2"},
>                                {"name": "project3"}
>                        ]
>                },
>                {
>                        "name": "B",
>                  "project":[
>                                {"name": "project1"},
>                                {"name": "project2"},
>                                {"name": "project3"},
>                                {"name": "project4"},
>                                {"name": "project5"}
>                        ]
>                },
>                {
>                        "name": "C",
>                  "project":[
>                                {"name": "project1"},
>                                {"name": "project2"}
>                        ]
>                }
>        ]
> }
>
>
> On 3 Sep, 00:44, MorningZ <[EMAIL PROTECTED]> wrote:
>> "What can cause this?"
>>
>> that would be your code...  but where and when and how is unknown with
>> what little you provide
>

Reply via email to