I also tried to use "flushCache" but I think that works only for
remote data.
On Oct 8, 3:09 pm, mario <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using an input box with an autocompleter with local data, like
> this:
>
> >> var persons = [{name : "John"}, {name : "Carl"}, {name : "Susan"}];
> >> $('#inputname').autocomplete({ data: persons, (...) });
>
> And was trying to see if i could update the local data by adding
> another object to persons:
>
> >> persons[persons.length] = {name: "New Name"};
>
> But the autocomplete doesn't read the data dynamically and it seams to
> only read the data on load. I tried with:
>
> >> $('#inputname').autocomplete("setData", { data: persons, (...) });
>
> AND by destroying the autocomplete and resetting the autocomplete:
>
> >> $('#inputname').autocomplete("destroy");
> >> $('#inputname').autocomplete({ data: persons, (...) });
>
> but none seemed to work.
>
> Is there anyway to accomplish this, I prefer to load the data locally
> to minimize the load on the server...
>
> Thanks,
> Mario
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---