jquery-autocomplete

JQuery autocomplete server-side matching

旧时模样 提交于 2019-12-21 16:19:35
问题 I am trying to setup an autocomplete field. I'v read the JQuery UI documentation, but all the example assume the source is a static list of items from which JQuery will pick matching entries (I mean static = the list is complete and doesn't depend on what the user typed). Here is the code from the "remote datasource" example: $( "#birds" ).autocomplete({ source: "search.php", ... I would like JQuery to call search.php?query=mytext (this URL returning a list of matching items) because I need

jQuery UI autocomplete refresh data

こ雲淡風輕ζ 提交于 2019-12-20 12:35:43
问题 I use jQuery ui autocomplete feature. var colors; $(document).ready(function(){ loadColors(); $('#empf').autocomplete(colors); } function loadColors(){ colors = new Array(getNumColor()); //in a loop save the colors to array using colors[i] = ... } function addColor(){ ... color[n] = color; } When the user enters new color it is saved to the color array. I switch to the autocomplete form but the entered data is not aviable until I refresh the page. Any ideas how to make the new color avialable

jQuery Autocomplete using extraParams to pass additional GET variables

喜欢而已 提交于 2019-12-20 09:24:08
问题 I am referring specifically to the jQuery Autocomplete v1.1 plugin by Jörn Zaefferer [source: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/] as there seems to be quite a few variations of this plugin. I'm trying to pass additional parameters to the server when the user starts typing because I have multiple fields that I want autocomplete to provide suggestions for. In addition to the query, I want to send the input name attribute to the server but I can't seem to use $(this

How to populate data in autocomplete textbox when a button is clicked?

自古美人都是妖i 提交于 2019-12-20 04:51:39
问题 I have a textbox with jquery autocomplete feature.It populates data based on a condition if '/' is entered and then a character.But i want to populate all the data in the autocomplete list when a button is clicked inspite of what ever data is there in the textbox. My button : <asp:Button ID="Button2" runat="server" Text="Button" /> And my autocomplete function with condition to populate data is: <script type="text/javascript"> function pageLoad(sender, args) { $(function () { $("#<%=txtCu

Is there more than one jQuery Autocomplete widget?

情到浓时终转凉″ 提交于 2019-12-19 00:23:30
问题 I thought there was only one - included in jQuery UI and documented here. I know there are third-party autocomplete widgets that plug-in to jQuery, like the one from devbridge. But I would describe that as an autocomplete widget for jQuery , rather than the jQuery autocomplete widget . But on Stackoverflow, I see questions asking about an autocomplete widget that does not use the syntax described in the jQuery UI documentation. For example: jquery.autocomplete.js - how does autocomplete work?

Is there more than one jQuery Autocomplete widget?

心已入冬 提交于 2019-12-19 00:23:21
问题 I thought there was only one - included in jQuery UI and documented here. I know there are third-party autocomplete widgets that plug-in to jQuery, like the one from devbridge. But I would describe that as an autocomplete widget for jQuery , rather than the jQuery autocomplete widget . But on Stackoverflow, I see questions asking about an autocomplete widget that does not use the syntax described in the jQuery UI documentation. For example: jquery.autocomplete.js - how does autocomplete work?

jQuery UI Autocomplete using a static json file as source

谁都会走 提交于 2019-12-18 11:56:49
问题 I'm using jquery-ui-autocomplete (actually, a catcomplete attached to a search box). It works vey well as long as I use a static-defined array of items as source. For performance reasons, I don't want the autocomplete to send Ajax requests to a PHP script making %like% requests to MySQL. So, I generated a JSON file from the DB , containing every item that can be matched in the search (about 20-30 items, from many sql tables). I'd like to read/parse the file only once, as the page loads or

jQuery autocomplete: How to show an animated gif loading image

痴心易碎 提交于 2019-12-18 10:19:08
问题 I'm using the jQuery AutoComplete plugin combined with ajax. Do you know how can I show a progress indicator while the ajax search is performed? This is my current code. <script type="text/javascript"> $("#autocomplete-textbox").autocomplete('http://www.example.com/AutoComplete/FindUsers'); </script> <div> <input type="text" id="autocomplete-textbox" /> <span class="autocomplete-animation"><img id="ajaxanimation" src="../img/indicator.gif")"/></span> </div> The FindUsers URL returns a user

Style jQuery autocomplete in a Bootstrap input field

孤者浪人 提交于 2019-12-18 10:03:01
问题 I have implemented a jQuery autocomplete function to a Bootstrap input. The jQuery autocomplete is working fine but I want to see the results as a combo and I guess it's now happening because I'm using BootStrap. This is the field that I'm assigning autocomplete: <div class="form-group"> <label>Employee</label> <input class="form-control" name="txtEmployee" placeholder="Trabajador"> </div> $(this).autocomplete({ source: function(request, response) { $.ajax({ url: '@Url.Content("~/Employee

Style jQuery autocomplete in a Bootstrap input field

风格不统一 提交于 2019-12-18 10:02:01
问题 I have implemented a jQuery autocomplete function to a Bootstrap input. The jQuery autocomplete is working fine but I want to see the results as a combo and I guess it's now happening because I'm using BootStrap. This is the field that I'm assigning autocomplete: <div class="form-group"> <label>Employee</label> <input class="form-control" name="txtEmployee" placeholder="Trabajador"> </div> $(this).autocomplete({ source: function(request, response) { $.ajax({ url: '@Url.Content("~/Employee