jQuery UI autocomplete returns "Request-URI Too Large"
jquery, jquery-ui-autocomplete
Solution
Autocomplete may not understand your array as a local source because its not made of objects each being made of a "label" and a "value" attribute. In your case you provided an id and a name that are not what it expects. You will have to transform this array'objects, or you may only provide an array of strings that will be used as labels. Because jQuery UI Autocomplete does not find what it is searching for in your array, it switches to the next interpretation: a url.
Problem
I'm trying to use jQuery.autocomplete without using callback. My JSON data source is stored in a JS varaible. The point of this is to avoid make a serve call. But when I try using autocomplete, I keep getting the error message Request-URI Too Large This is my code: ``` // This list is much longer country_data_source = [{"id":"AF","name":"Afghanistan"},{"id":"AL","name":"Albania"},{"id":"DZ","name":"Algeria"},{"id":"AS","name":"American Samoa"},{"id":"AD","name":"Andorra"},{"id":"AO","name":"Angola"}] jQuery( "#country" ).autocomplete({ minLength: 0, source: country_data_source }); ``` Is jQuery still using POST/GET thus giving me this error due to browser restriction? *Note: * If I just use the short list above, autocomplete is not responding at all. Even tried `$.getJSON(country_data_source)`