• [autocomplete] suggestion dropdown occupies entire width of browser in chrome and safari

    I have tried the default styles that came with autocomplete. The problem exists even with that theme. This doesnt happen in FF 3.6, IE 8 or Opera 10.5.3. It does happen in Safari 4 and Chrome 4. Strangely enough, at times if I delete a char or add a space and thus re trigger the suggestion menu, it works fine with the proper width. But it isnt consistent. Isnt anyone else facing this problem? The above pic is the remote caching jsonp demo from the jquery ui downloads running in Chrome.
  • Autocomplete-enabled field not submitting when pressing enter

    Hi everybody, I have a search field on which I activate the Jquery UI autocomplete (which I find wonderful by the way). When no suggestions are available, pressing the enter key does submit the form, but this ain't the case when suggestions ARE available. I press the enter key and nothing is happening. Note that if a select a suggestion, this works, but it should work too when you want to search/submit with the value you entered without selecting any autocomplete suggestions. If you want to see the
  • Any plan to make autocomplete work for Japanese?

    Hi! Autocomplete (UI1.8.4) does not work with Japanese. Is there any plan in the works to make it internationalized? The problem is the way keypresses are handled. Japanese is entered using an IME, so it takes more than one keypress to enter a character. Thanks! =David
  • Strange autocomplete error on submit

    Using autocomplete to grab pipe-delimited data via ajax (as in the demo), and it works fine.  Then I use: $("input#MyField").result(log);to run a function to populate some form fields on the page, which also works. function log(event, data, formatted) {                      document.addPlayerForm.uppr_p_w_address.value = data[1];     document.addPlayerForm.uppr_p_w_city.value = data[2];     // 7 or 8 more fields populated here } However, client is reporting that intermittently (say 25% of the time),
  • jQuery ui autocomplete - renderItem url's

    Hi, Using: .data( "autocomplete" )._renderItem = function( ul, item ) {                     return $( "<li></li>" )                     .data( "item.autocomplete", item )                     .append( "<a>" + item.value + "<br>" + item.url + "<br>" + item.description + "<br>" + "Support URL: " + item.support_url + "<br>" + "Contact: " + "<a href=" + item.contact + ">Test</a>" + "<br />" + "</a>"  )                     .appendTo( ul )    jQuery is parsing the item.url and automatically making that
  • Autocomplete plugin inside Tabs inside a Dialog: is this a Bug?

    Hello, I am using ASP.NET MVC2. I have a jQuery dialog that contains a jQuery Tab plugin with three tabs. Inside the first tab I have a table with some input controls.  I have tried to use an input HTML control with the autocomplete plugin but when I use this plugin I get the following error in the jQueryUI code as soon as the dialog opens. Uncaught TypeError: Cannot call method 'zIndex' of undefined  I am using jquery-ui-1.8.4. I am reporting the piece of the plugin code and I have marked in bold
  • Autocomplete element position bouncing around

    Hello all, I'm having a problem with the AutoComplete module (or possibly more specifically the 'position' module), in that I have found when the AutoComplete list is being shown, and the document size (height/width) changes, due to what is being typed in, then the list will become detached (visually) from the input element. The basic cause for this appears to be that the list has 'position: relative' (and then top / left as needed). Since it is relative, and the document size changes, the list bounces
  • autocomplete - repeat searches no results.

    Hello all! First time in the forums. I have setup an autocomplete text field, linked to a db datasource that is loaded through an ajax json call. I have noticed that if a perform a search (e.g. "ch"), then backspace and perform the exact same search, the results dropdown will not appear the second time. This only happens if performing the exact same search twice in a row. If I do another search (e.g. "chr"), the second time, then do my original search I will get the results dropdown as expected.
  • Autocomplete combobox default choice

    The autocomplete combobox sample located that link below is great. http://jqueryui.com/demos/autocomplete/#combobox There is one problem I have found that I could use some help fixing. Any <option> elements without a value (<option value="">Please Select</option>) wont appear in the list. So once you have selected an item, you can't go back to the default (null) value. Can anyone help me with this? Thanks, Mossy
  • Autocomplete ( not the plugin ) in firefox triggers which event?

    Hi jQuery developers/designers, I have the following question: What event could be or is triggered when someone fills in a inputfield using the autosuggest that is build in in browsers? Like for example my email that always comes back on email input fields. I have tried the change and keyup event but they don't work. So I repeat my question: What event could be or is triggered when someone fills in a inputfield using the autosuggest that is build in by browsers? Greetings
  • Autocomplete and bold highlight

    I've gone from the Jorn autocomplete plugin to the jQuery UI autocomplete plugin. Not sure why, because I liked Jorn's plugin but it feels better to use jQuery UI. Here's my hack to make the searched for work highlit.   $('#id_q').autocomplete({     source: function(request, response) {       $.ajax({         url: AUTOCOMPLETE_URL,         dataType: 'json',         data: { q: request.term },         success: function(data) {           response($.map(data, function(item) {             return {label:
  • autocomplete form input

    I have a form that contains a jquery autocomplete field with a combobox per the example (http://jqueryui.com/demos/autocomplete/#combobox).  I'm now trying to submit the form and use the submitted value.  However, when I inspect the form using Firebug, I don't see the input field in the form.  Any thoughts? I can see the combobox element as well as my other form elements.
  • Setting options in autocomplete after init has no effect

    Hello, I set up autocomplete (jQuery UI autocomplete - added in 1.8) like this: $("#client").autocomplete({ minLength: 0, source: '/path/to/autocomplete/ajax/datasource' }); Autocomplete works as expected. But then I need to change "source" option so I do this: $("#client").autocomplete("option", "source", "/path/to/another/datasource"); but is still requests original datasource URL (I used to FireBug and it's the same URL). No change happened. I tried different options, but with no luck. Even destroy
  • Setting combobox value from code?

    I just updated the UI library for a project to the 1.8.4 and am now trying to make use of the new autocomplete/combobox feature.  I have this working fine, but need to dynamically set the value of the combobox when populating an edit form.  I've tried setting the value on the original select and that is not working. I'm sure I can determine the selector for the dynamically created input box and set the value there, but is this the "right" way to do things? Thanks Shawn
  • How to access value passed from autocmplete.('search','thevalue') in the autocomplete search event?

    I have a call to the search method $('myelem').autcomplete('search','thevalue'); and have an event handler for the search event search: function (e, ui){ var value=?? //need to acces "thevalue" here } where I need to access "thevalue" in the body of the function. Is the search method value passed to the search event in some way? Thanks, Chris
  • Dynamic height of autocomplete menu and some other notes

    Hi !   I'm very-very fresh user of jQuery and jQuery UI. So excuse me if I'm inventing the wheel and my solutions may be made in "conventional" way.   I like the idea of setting the max menu height in the CSS. But the problem is that when the list became small, the menu div is not resized and looks not so aesthetic. To solve this I've created two CSS classes, that looks like this:   .ui-autocomplete-scroll { height: 200px; overflow-y: scroll; } .ui-autocomplete-noscroll { overflow-y: auto; }   and
  • Autocomplete : Extract search logic

    Hello, Since search could be used in a lot of cases : *Autocomplete *In developement : MultiCheckBoxPicker *Planed : Grid *As a search utility...Shouldn't we extract the search logic from the autocomplete library ? Pros : *Could be use as an utility *Easier to maintain and develop *Library would be more light weightCons : *Migth impact a little bit performance *Need time to be developed (like each evolution...) Well what do you think about this ? I can develop it, if needed :)
  • How do I return 'No results'

    This is my jQuery: $('#locality_input').autocomplete({    source: function(request, response) {     $.ajax({      url: 'php/csvtoarray.php',      dataType: 'json',      data: {       state: $('#state').val(),       q: request.term      },      success: function(data) {       response($.map(data, function(item) {        return {         label: item.locality + ', ' + item.postcode + ', ' + item.state,         value: item.label,         postcode: item.postcode,         locality: item.locality        }
  • Autocomplete combobox, prev + next result set, how?

    Hello, i have a autocomplete combobox and it works fine, i want to add a option that users instead of typing some part of a string to get the items they want, I want the users to have the opportunity to browse through the items with a next/prev. button. Is it possible if so how?
  • jQuery MENU & AutoComplete causing conflict

    Hello, I am using the jQuiery UI AutoComplete and everything works great. As soon as I started adding in the MENU structure (IE: iPod drill down menu) it causes conflict. I realize that there is still development being done on the project, but has anyone else run into this problem and noticed a fix for it? I really like the menu structure, and not sure which I want to sacrifice if I have to. I would greatly appreciate some heads-up if anyone knows of anything. Cheers.
  • Autocomplete - check if manual or selected?

    Hello, I'm new to javascript and was hoping someone would be able to help me out. I'm using the jQuery UI Autocomplete but have ran into a problem.  I would like to know if the user manually enters a name without selecting from the autosuggest list. If this happens I would then display a bit of text 'user not selected from list'. How would I go about doing this? My code:     $(function() {             $('#userID').val("");                        $('#userName').val("");             $('#name').val("");
  • Supressing Autocomplete menu open on search

    I've got an Autocomplete box that is a filter to a datatable. When the person searches in the box, autocomplete does it's job and attached to the source callback, it does an ajax lookup and triggers an update to the table. Additionally it updates a div mentioning how many suggested results were returned. I've also got a "suggest" button that triggers .("search") and .("close") to show or hide the menu. I'd like to suppress the auto opening of the menu during normal search. I've tried to override
  • Using Autocompletion() with Arrays that don't start at index 0

    This is more of a gotcha than an error. I am using the autocompletion() UI widget on a form input field.  The field is for a file name.  I am dynamically generating the array for this field by looping over the file names in a specific directory.  In my loop, initially I skipped any undesired names I loop over (ex. '.svn', 'thumbs.db', etc).  Since these were there in my directory and were at the top of the list, my array started on index 2 instead of index 0. That caused the widget to throw an error
  • How to get Autocomplete to auto-select the first item

    Seems a little silly to me, but my customer is insisting that I get the jQuery Autocomplete widget to behave the same way as the YUI widget: http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_array.html ...specifically, on that YUI demo, if you type 'f', only Florida is returned, and if you hit tab, 'Florida' is selected. On the jQuery Autocomplete widget however (http://jqueryui.com/demos/autocomplete/), if you type, say, '+', and only 'c++' is returned, if you hit tab, the input field
  • in my autocomplete select handler "focus()" doesn't work

    Ok I have some autocompletes for some input fields, and I wanted to pass the focus to the next field over when the user makes a selection from the preceding inputs autocomplete list. So in my select handler, after setting all the field values I added a "focus()" but it doesn't work. Here's the code I'm using: // As soon as a certain div is opened, focus goes to my first field to which I also apply autocomplete $("input#db_street").focus().autocomplete({     source: "mysource.php",     minLength:
  • Is it possible to cancel autocomplete's search processes?

    With autocomplete, as you type in the input box every new character you type will trigger a new search process. If the first one is a little long, and hasn't finished by the time you type the next one, you will then have two search processes, one for the first character and another for the first two characters. And what happens is that if you type quickly what you type actually gets mangled as the single processes come to a completion. I guess for now the best way to avoid that is to have the search
  • UI AutoComplete Multiple Demo - Caret Position in IE

    While attempting to implement an autocomplete widget similar to the " Multiple values " and " Multiple, remote " demos on the jQuery UI website, I discovered a minor issue when using the autocomplete field in Internet Explorer (tested in IE7 and IE8). Once the user selects an item from the autocomplete dropdown, the caret (cursor) position in the text field resets to the beginning of the text field, rather than moving to the end of the value. Because of this, if the user is not savvy enough to realize
  • Autocomplete - after select, scroll to div?

    Hi guys, I have finally figured out how to get jquery autocomplete to run from my MySQL databae in PHP. Is it possible to get it to scroll to a div of the same ID (or similar) as the item selected from the autocomplete drop down? Preferably with a highlight of the selected div? Here's what I have so far... Thanks fot the help! <script type="text/javascript">     $(function() {         $("#search").autocomplete({             source: "search2.php",             minLength: 2,             select: function(event,
  • autocomplete - just showing loading gif

    Hi, I just added a very simple autocomplete  test (never used it before) to a input field:-   $('#fvenue').autocomplete({     source: ['myc','wya','rya']   }); But I'm getting this error:- http://www.sailwave.com/stuff/Clip1.jpg Anybody else seen that or knows what I'm doing wrong... Latest formal releases of jQuery and UI - 1.8.2 and 1.4.2
  • Autocomplete user type exactly a result term

    Hello, Is there any way to detect if the information written by the user is exactly the result for a query? For example, if I use autocomplete to search my database and return a hidden ID, but I prefer writting all the word in the input instead of choosing from the results, how can I detect "onchange" that the user has written a valid term (as the "ui.item" on function change is undefined). To show you an example, take the page http://jqueryui.com/demos/autocomplete/custom-data.html . If you write
  • Making old plugins work with 1.4.2

    Hi there. I currently have a couple old plugins (autocomplete 1.1 by Joern Zaefferer - json version, and datepick by Keith Wood) that do not work with 1.4.2, but do with 1.3.2. I'm wondering if it's possible to somehow force or modify them to work with the new version of jQuery. I know they both have new versions, and are now a part of jQuery UI, but I can't seem to get the UI versions to work. UI also seems more bloated than I need, for just a few functions. Any help would be greatly appreciated.
  • Autocomplete, multiple values and TAB key problem

    I'm trying to get the autocomplete widget to handle multiple values . I've seen the samples on the demo site as well as the blog entry here: http://www.codenition.com/jquery-ui-multicomplete-widget-based-on-autocomplete plus I'm sure a few other's I'm not remembering off the top of my head. All of the samples fall short in how they handle the tab key imo. As I see it, the tab key should autocomplete when a suggestion is selected but move on to the next input when one is not. In addition, when it
  • Datepicker and Description onchange

    I have dates and description. If the date is entered, then the description should autocomplete. Like if 12/25/yyyy is selected, then Christmas should automatically be shown?   I tried this, but its not working. Any help? <html> <head> <script type="text/javascript"> $(function() { $('#date').datepicker(); }); $(function() { var availableTags = ["Christmas Day","etc"]; $("#tags").autocomplete({ source: availableTags }); }); $('#date').change( function() { if ($(this).val().substring(0, 5) === '12/25')
  • Javascript Autocomplete

    I have two INPUT type="text" boxes. First is Date and second is description. For date I am using Jquery UI widget 'datepicker' and for description I am using jquery Autocomplete and defined some names What I want is...If 12/25/YYYY is selected. I want to autocomplete the second text box with Cristmas and vice versa. How can I do this with javascript?
  • Autocomplete and Master page issue

    Hi, I have UI autocomplete assigned to a text box using a master page. When autocomplete shows, and I tried to scroll the page, the listbox item/element also scrolls within the page. Is there a way to make the autocomplete listbox element fixed to its designated textbox control? It seems the autocomplete listbox is floating (in a way).   I tried it without the master page, and it works.
  • jQuery UI multicomplete widget, based on autocomplete

    Hey, I've written an multicomplete widget that extends the autocomplete widget and allows it to have multiple values separated with a comma. My post about it can be seen here and the source code here. I would love to get some feedback, especially regarding to what I did with _trigger and _initSource, as I'm not too satisfied with it but couldn't find a better solution. Are there any better ways to do that? Thanks!
  • Autocomplete with PHP? Can't figure this out

    Okay here's the deal, I'm trying to get autocomplete to work on a form, and its pulling from an PHP file on my server. Just to make this open, the file in question is http://textbookly.com/jQuerytest/code/ajax.php?term=test where test is where the query is. Its output is text, and I think the format is acceptable. <script type="text/javascript">  $(function() { function log(message) {  $("<div/>").text(message).prependTo("#log");  $("#log").attr("scrollTop", 0); }  $("#birds").autocomplete({ source:
  • Autocomplete + dialog + scroll

    I use an autocomplete inside a dialog. This all works fine, but not when I use the wheel on the mouse to scroll. The autocomplete remains on the fixed position. Example on http://jsbin.com/ivibi4/edit Can I fix this with css? I have this behavior in IE8 and FF 3.6
  • Customizing Autocomplete: Select Value Only and Fixing Lagging Autocomplete Menu Requests

    hi, I have two questions on customizing autocomplete.  I acutally thought I saw someone ask the same question somewhere, but I haven't been able to find it. 1) How do you customize the drop down menu so that a user can only input a selected item and not anything unique? So if a user has "option1", "option2", and "option3" in the drop menu, tha'ts the only three things they can put into the input textfield 2) I am still working on optimizing my search, but it's a little slower than a user's typing
  • Autocomplete: term parameter name

    Is it possible to add an option to change the name of the term request parameter, to either be set as an option or to default to the name of the form input i.e. <input name="search" type="text" /> would produce a request param of search instead of term 
  • Next Page

  • Announcements

  • The Basics of jQuery AJAX

    A step-by-step tutorial for those new to jQuery and wanting to use AJAX in their projects. Includes valuable information about troubleshooting using the console and understanding the request / response. http://jayblanchard.net/basics_of_jquery_ajax.html
  • jQuery Conference 2010: Boston Announcement

      The jQuery Project is very excited to announce the jQuery Conference 2010: Boston on October 16-17, 2010.  The conference will be held at the Hilton Boston Logan in Boston, Massachusetts.  The best part of this announcement is that Tickets are on sale now!  This venue is the largest that the project has worked with to date (Harvard Law School in ‘07, the MIT Stata Center in ‘08 and Microsoft New England Research Center in ‘09) and we expect to sell out very quickly. A brief synopsis of some of