http://qs321.pair.com?node_id=988892


in reply to perl jquery script returns http status undefined sometimes

Well ... for starters, the problem could be loads of different things but I'm guessing the results from your DB query are not in the format jquery autocomplete expects them to be:

The data from local data, a url or a callback can come in two variants +: An Array of Strings: [ "Choice1", "Choice2" ] An Array of Objects with label and value properties: [ { label: "Choice1", value: "value1" }, ... ]
Also ... I'm unsure but you may have to set the content-type to 'application/json' on the response. I do that but I cannot remember if I *needed* to or if I just thought it was good form.

As for the console, the autocomplete widget has some delays built into it so it doesn't swamp the server, if you type normal speed, you may not see an ajax request for each letter -- try typing slower to see ajax call per letter.

-derby