jquery-ui-autocomplete

Is it posible to have jQuery UI autocomplete on a contenteditable div and datepicker working in harmony?

风流意气都作罢 提交于 2019-12-22 10:08:00
问题 In the forum post "How to make jquery autocomplete to work for a contenteditable DIV instead of just INPUT, TEXTAREA fields." we see how to get autocomplete working on a contenteditable div element, however combined with datepicker the datepicker simply does not populate the input field. As you can see in this jsFiddle demo: http://jsfiddle.net/xvnaA/ Anyone have any wise ideas on how to fix this? 回答1: Instead of just overriding $.fn.val you could redefine it like this: (function ($) { var

jQuery UI autocomplete works in Firefox but not in IE

旧巷老猫 提交于 2019-12-22 08:24:09
问题 I've got the new autocomplete widget in jQuery UI 1.8rc3 working great in Firefox. It doesn't work at all in IE. Can someone help me out? HTML: <input type="text" id="ctrSearch" size="30"> <input type="hidden" id="ctrId"> Javascript: $("#ctrSearch").autocomplete({ source: "ctrSearch.do", minLength: 3, focus: function(event, ui){ $('#ctrSearch').val(ui.item.ctrLastName + ", " + ui.item.ctrFirstName); return false; }, select: function(event, ui){ $('#ctrId').val(ui.item.ctrId); return false; }

Canonical Way to use JQueryUI Autocomplete with Meteor

核能气质少年 提交于 2019-12-22 06:35:48
问题 Using Meteor, I'd like to understand the most efficient way to use JQuery UI's Autocomplete with large volumes of server-side data. I have two working proposals and would like to hear opinions on the differences and if there are any better ways to do the same thing. Using pub/sub: // Server Meteor.publish("autocompleteData", function (theSearchTerm) { var query = { name: { $regex: theSearchTerm, $options: 'i'} }; return MyData.find(query, options); }); // Client Template.myTemplate.rendered =

jQuery UI Autocomplete .result is not a function woes

六眼飞鱼酱① 提交于 2019-12-22 04:56:36
问题 I've done some searching, and this seems to be a not uncommon problem, but none of the solutions posted seem to be working for me. I've tried a few different methods: jQuery(document).ready(function(){ jQuery( "#on-good-terms-add-term" ).autocomplete({ source: ongoodtermsavailableTags, }); jQuery( "#on-good-terms-add-term" ).result(function(event, data, formatted) { alert(data); }); }); and jQuery(document).ready(function(){ jQuery( "#on-good-terms-add-term" ).autocomplete({ source:

jquery-ui autocomplete does not select on enter

橙三吉。 提交于 2019-12-22 04:07:24
问题 I have used the jquery-ui to autocomplete an input box and set a hidden value from the selected item. This I did using the select: function(event, ui) { ...$("#myDiv").val(ui.item.value)... } option (might be wrong now, don't have the code at hand, but it works up until my question...) It works when select an item from the menu with the mouse, however if I just enter some text and choose an item with Enter - it does not do anything, it is as if the select is not run at all by the autocomplete

jquery-ui autocomplete does not select on enter

折月煮酒 提交于 2019-12-22 04:07:08
问题 I have used the jquery-ui to autocomplete an input box and set a hidden value from the selected item. This I did using the select: function(event, ui) { ...$("#myDiv").val(ui.item.value)... } option (might be wrong now, don't have the code at hand, but it works up until my question...) It works when select an item from the menu with the mouse, however if I just enter some text and choose an item with Enter - it does not do anything, it is as if the select is not run at all by the autocomplete

jquery autocomplete renderItem

廉价感情. 提交于 2019-12-22 03:42:23
问题 I have the following code. It generates no js errors. Can't get the autocomplete to display any results: $(function() { $.ajax({ url: "data.xml", dataType: "xml", cache: false, success: function (xmlResponse) { var data_results = $("Entry", xmlResponse).map(function () { return { var1: $.trim($("Partno", this).text()), var2: $.trim($("Description", this).text()), var3: $.trim($("SapCode", this).text()), var4: $("Title", this).text(), var5: $.trim($("File", this).text()), var6: $.trim($(

JqueryUi Autocomplete shown in wrong place when using input field in div with position:fixed

早过忘川 提交于 2019-12-22 01:51:09
问题 I have a " modal window " in a webpage obtained by applying to a div the css property position to fixed . The div contains input fields. In particular, I'm using the autocomplete widget from jQueryUI . There are two major problems: 1) the first is that, since the div has a fixed position, when you scroll down the webpage, the autocomplete suggestions are not shown fixed but are moved up and down with the page. You can see that problem at this Codepen where I'm using an example from jQuery

jQueryUI autocomplete with url as source (am using Django)

梦想与她 提交于 2019-12-21 17:48:46
问题 I am using Django web-framework for database, page generation etc. jQueryUI / javascript side of the code I want to use jQueryUI's autocomplete widget, as my data set will contain about 1,000 entries I wanted to query the database. On the link above it claims you can simply provide a url that returns JSON data: Autocomplete can be customized to work with various data sources, by just specifying the source option. A data source can be: * an Array with local data * a String, specifying a URL *

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