Search Results

Search found 933 results on 38 pages for 'autocomplete'.

Page 4/38 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • JQuery Autocomplete CSS not working?

    - by gath
    I am trying to implement JQuery Autocomplete pluggi using Django. I've been able to wire the thing together and I can actually see the result back in the HTML template. My problem is that the JQuery Autocomplete CSS doesn't seem to work. The results I get are not well formatted/styled, and they have no background and you cannot even select them. What is it that am missing? I have these three files in my media folder same folder: autocomplete.js dimensions.js autocomplete.css In my html template I have the following function: $(function(){ setAutoComplete("tags", "tagResults", "/taglookup/?query="); }); My textfield looks like this; <input type="text" name="tags" value=""> Where do I put the tagResults in my HTML template document? Every time I try to introduce a DIV with id="tagResults", JQuery throws an error. Any ideas?

    Read the article

  • Avoid multiple autocomplete calls by wrapping it with SetTimeOut

    - by pixelboy
    Here's my issue : using an autocomplete jQuery plugin, I'd like to avoid multiple ajax requests when user strikes his keynoard by surrounding the $('#query1').autocomplete({ serviceUrl:'/actions/autocomplete?population=salon', minChars:3, maxHeight:300, width:200, clearCache:true, onSelect: function(suggestions,data){ $(".btn1").attr("href", "${pageContext.request.contextPath}/actions/espaceClients?participantId=" + data) } }); with something like var search = false; $('#query1, #query2, #query3').keyup(function(){ if (!search){ search = true; } if (search) { search = false; autocompleteThem(); } }); A you can see, above code is stupid, but it kinda shows what i'm trying to do. In simple words, if user dosen't type anything else in a certain period of time, then you can call autocomplete. I hope i'm being clear, as my brains are a mess...

    Read the article

  • jQuery autocomplete on multiple fields

    - by Onigoetz
    Hi all, Surprisingly, I didn't find any answers to my question. I want to make a form on jQuery with two fields. City Code. City Name. and when I enter a city code and go out of the field. I want an autocomplete on the city name. I Installed the jQuery Autocomplete plugin. and I have the following code : $(document).ready(function() { $("#field_localite").autocomplete('admin/ajax/npa', { extraParams: { npa: function() { return $("#field_npa").val(); } } }); $("#field_npa").blur(function() { $("#field_localite").search(); }); }); The problem is that the .search() method. doesnt launch the autocomplete. I'm looking for a method to trigger this autocomplete search on the field. do you know a way or a plugin able to do this search ? thanks in advance BTW : the PHP code behin is totally tested and works, it returns the data when doing the call.

    Read the article

  • autocomplete: how do I avoid a duplicate search?

    - by dnagirl
    I use JQuery plugin autocomplete as a kind of dataset chooser. If the user chooses a value from the autocomplete lookup, the database is queried for the matching dataset. If the user types in a new value, the user can enter a new dataset. An issue arises when the user types in an existing value rather than choosing it from the autocomplete lookup. When this is done, the autocomplete .result() method is not called and no dataset is retrieved. To fix this I added a .blur(function(){$(this).search();}); to the input element. This fixed the original problem. Now I have the problem that .result() fires on selection from lookup AND on blur. I would like .result() to fire on selection from lookup OR on blur. How do I make that happen? Here is my code: $('#groupset').autocomplete('ajax/php/leeruns.php'); $('#groupset').result( function(event, data, formatted) { if(data){ $('#groupsetdesc').val(formatted); groups.load(data[1]); //retrieve matching dataset } else { $('#groupsetdesc').val(''); } } ).blur(function(){$(this).search();});

    Read the article

  • AutoComplete field and IE

    - by user102533
    My web page does not have the autocomplete attribute that would tell browsers not to autocomplete the field. In spite of not having this attribute, IE 8 or Safari (not sure on other browsers) does not autocomplete the page. Autocomplete does work on some sites (such as Gmail) so I am assuming that the browser setting is not causing it? Here's the code: <tr> <td>User Id</td> <td><input name="userId" type="text" id="userId" runat="server" /></td> </tr> <tr> <td>Password</td> <td><input name="password" type="password" id="password" enableviewstate="false" runat="server" /></td> </tr>

    Read the article

  • Asp.net button click populate Autocomplete for a textbox

    - by Geetha
    Hi All, I have created a keyboard using asp:button control. Onclientclick event it will display the corresponding text on the textbox. All these are working fine. Needs: I want to add autocomplete using jquery to a textbox. if i click the button [A] it has to display all the records with a. This process is working if im using the system keyboard. Code: <link href="CSS/jquery.autocomplete.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.autocomplete.js"></script> $("#antSearchText").autocomplete('SearchAutoComplete.ashx'); <asp:Button ID="six" runat="server" Text="6" CssClass="myclass" OnClientClick="return typeLetter(this);" /> Geetha.

    Read the article

  • jQuery TypeError: example("input#autocomplete").autocomplete is not a function

    - by Ankush Kalia
    I have tried alot to remove this error but could not get success.When i am running this script on localhost its working fine but not working on Joomla frame work. The code is below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <?php $viewFields=array('c++', 'java', 'php', 'coldfusion', 'javascript', 'asp', 'ruby'); ?> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script> var example=jQuery.noConflict(); var arrayFromPHP = <?php echo json_encode($viewFields) ?>; example(document).ready(function() { example("input#autocomplete").autocomplete({ source: arrayFromPHP }); }); </script> </head> <body> <center> <p><img src="<?php echo JURI::base(); ?>images/search_1.png" border="0" alt="" /> <img src="<?php echo JURI::base(); ?>images/business_2.png" border="0" alt="" /> <img src="<?php echo JURI::base(); ?>images/review_3.png" border="0" alt="" /> </p> </center> <input id="autocomplete" /> </body> </html> Its giving me this error:- -- [08:30:24.870] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://50.116.97.120/~amarhost/storage/media/system/js/mootools-core.js:343 [08:30:27.853] TypeError: example("input#autocomplete").autocomplete is not a function @ http://50.116.97.120/~amarhost/storage/index.php/component/storage/?action=war&Itemid=105:210

    Read the article

  • Selectively delete entries from Windows 7 autocomplete history dropdown box

    - by kez
    Random question, and I'm sure it has a very simple answer, if not already asked and answered in some shape or form. How do you selectively delete entries from the autocomplete history dropdown thingy? For example, in the Run dialog box, typing a few letters will display a dropdown box with a history of matchine entries that you have previously run. I swear I used to be able to delete from the list by using the arrow keys to highlight and then press the DEL key. Regardless of whether this is true or not, is there any way to selectively delete entries from this list? Another example is the dropdown list in the Remote Desktop Connection dialog box.

    Read the article

  • Notepad++ tabbing out of tags, autocomplete

    - by Matt
    I'm trying to learn a little HTML. Everyone says to use Notepad++ over notepad. I have autocomplete on. My question: When I type my opening tag and Notepad++ then puts"""" closing tag, how do I "jump" out of the tag when I'm done typing? If I tab or hit enter, I'm still stuck before the closing tag. I can use my arrow keys, but if I'm going to do that, I would rather just type the closing tags. Also if I have an UL of 10 items, and I want to change it to an OL, how do I select both the opening and closing tags so I may edit them at the same time? Thanks PS I wasn't able to post the HTML tags.

    Read the article

  • Visual Studio 10 Disable Find Autocomplete

    - by trinithis
    When I misspell something in Visual Studio 10's find box (the one that shows in the editor's main window, not the popup window "Find and Replace" window), VS10 autocompletes to that misspelled word whenever I try fixing it. A Ctrl+Z will remove the entire autocompletion, including the last character I typed (which it can case change!). Backspacing and retyping will still autocomplete to the misspelled word. Only a cut and paste seems to work. Is there a way to disable this horrible feature!? This is a picture of the find box that I am talking about:

    Read the article

  • From AutoComplete textbox to database search and display?

    - by svebee
    Hello everyone, I have a small problem so I would be grateful if anyone could help me in any way. Thank you ;) I have this little "application", and I want when someone type in a AutoComplete textbox for example "New" it automatically displays "New York" as a option and that (AutoComplete function) works fine. But I want when user type in full location (or AutoComplete do it for him) - that text (location) input is forwarded to a database search which then searches through database and "collects" all rows with user-typed location. For example if user typed in "New York", database search would find all rows with "New York" in it. When it finds one/more row(s) it would display them below. In images... I have this when user is typing... http://www.imagesforme.com/show.php/1093305_SNAG0000.jpg I have this when user choose a AutoComplete location (h)ttp://www.imagesforme.com/show.php/1093306_SNAG0001.jpg (remove () on the beggining) But I wanna this when user choose a AutoComplete location (h)ttp://www.imagesforme.com/show.php/1093307_CopyofSNAG0001.jpg (remove () on the beggining) Complete Code package com.svebee.prijevoz; import android.app.Activity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.TextView; public class ZelimDoci extends Activity { TextView lista; static final String[] STANICE = new String[] { "New York", "Chicago", "Dallas", "Los Angeles" }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.zelimdoci); AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, STANICE); textView.setAdapter(adapter); lista = (TextView)findViewById(R.id.lista); SQLiteDatabase myDB= null; String TableName = "Database"; String Data=""; /* Create a Database. */ try { myDB = this.openOrCreateDatabase("Database", MODE_PRIVATE, null); /* Create a Table in the Database. */ myDB.execSQL("CREATE TABLE IF NOT EXISTS " + TableName + " (Field1 INT(3) UNIQUE, Field2 INT(3) UNIQUE, Field3 VARCHAR UNIQUE, Field4 VARCHAR UNIQUE);"); Cursor a = myDB.rawQuery("SELECT * FROM Database where Field1 == 1", null); a.moveToFirst(); if (a == null) { /* Insert data to a Table*/ myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (1, 119, 'New York', 'Dallas');"); myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (9, 587, 'California', 'New York');"); } myDB.execSQL("INSERT INTO " + TableName + " (Field1, Field2, Field3, Field4)" + " VALUES (87, 57, 'Canada', 'London');"); } /*retrieve data from database */ Cursor c = myDB.rawQuery("SELECT * FROM " + TableName , null); int Column1 = c.getColumnIndex("Field1"); int Column2 = c.getColumnIndex("Field2"); int Column3 = c.getColumnIndex("Field3"); int Column4 = c.getColumnIndex("Field4"); // Check if our result was valid. c.moveToFirst(); if (c != null) { // Loop through all Results do { String LocationA = c.getString(Column3); String LocationB = c.getString(Column4); int Id = c.getInt(Column1); int Linija = c.getInt(Column2); Data =Data +Id+" | "+Linija+" | "+LocationA+"-"+LocationB+"\n"; }while(c.moveToNext()); } lista.setText(String.valueOf(Data)); } catch(Exception e) { Log.e("Error", "Error", e); } finally { if (myDB != null) myDB.close(); } } } .xml file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="20sp" android:gravity="center_horizontal" android:padding="10sp" android:text="Test AutoComplete"/> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="AutoComplete" /> <AutoCompleteTextView android:id="@+id/autocomplete_country" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp"/> </LinearLayout> </LinearLayout>

    Read the article

  • jQuery AutoComplete (jQuery UI 1.8rc3) with ASP.NET web service

    - by user296640
    Currently, I have this version of the autocomplete control working when returning XML from a .ashx handler. The xml looks like this: <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <States> <State> <Code>CA</Code> <Name>California</Name> </State> <State> <Code>NC</Code> <Name>North Carolina</Name> </State> <State> <Code>SC</Code> <Name>South Carolina</Name> </State> The autocomplete code looks like this: $('.autocompleteTest').autocomplete( { source: function(request, response) { var list = []; $.ajax({ url: "http://commonservices.qa.kirkland.com/StateLookup.ashx", dataType: "xml", async: false, data: request, success: function(xmlResponse) { list = $("State", xmlResponse).map(function() { return { value: $("Code", this).text(), label: $("Name", this).text() }; }).get(); } }); response(list); }, focus: function(event, ui) { $('.autocompleteTest').val(ui.item.label); return false; }, select: function(event, ui) { $('.autocompleteTest').val(ui.item.label); $('.autocompleteValue').val(ui.item.value); return false; } }); For various reasons, I'd rather be calling an ASP.NET web service, but I can't get it to work. To change over to the service (I'm doing a local service to keep it simple), the start of the autocomplete code is: $('.autocompleteTest').autocomplete( { source: function(request, response) { var list = []; $.ajax({ url: "/Services/GeneralLookup.asmx/StateList", dataType: "xml", This code is on a page at the root of the site and the GeneralLookup.asmx is in a subfolder named Services. But a breakpoint in the web service never gets hit, and no autocomplete list is generated. In case it makes a difference, the XML that comes from the asmx is: <?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://www.kirkland.com/"><State> <Code>CA</Code> <Name>California</Name> </State> <State> <Code>NC</Code> <Name>North Carolina</Name> </State> <State> <Code>SC</Code> <Name>South Carolina</Name> </State></string> Functionally equivalent since I never use the name of the root node in the mapping code. I haven't seen anything in the jQuery docs about calling a .asmx service from this control, but a .ajax call is a .ajax call, right? I've tried various different paths to the .asmx (~/Services/), and I've even moved the service to be in the same path to eliminate these issues. No luck with either. Any ideas?

    Read the article

  • Autocomplete in Silverlight with Visual Studio 2010

    - by Sayre Collado
    Last week I keep searching on how to use the autocomplete in silverligth with visual studio 2010 but most of the examples that I find they are using a textbox or combobox for the autocomplete. I tried to study those examples and apply to the single autocomplete from tools on my silverlight project. And now this is the result. I will use a database again from my previous post (Silverlight Simple DataBinding in DataGrid) to show how the autocomplete works with database. This is the output: First, this is the setup for my autocomplete: //The tags for autocompletebox on XAML Second, my simple snippets: //Event for the autocomplete to send a text string to my function private void autoCompleteBox1_KeyUp(object sender, KeyEventArgs e) { autoCompleteBox1.Populating += (s, args) => { args.Cancel = true; var c = new Service1Client(); c.GetListByNameCompleted +=new EventHandler(c_GetListByNameCompleted); c.GetListByNameAsync(autoCompleteBox1.Text); }; } //Getting result from database void c_GetListByNameCompleted(object sender, GetListByNameCompletedEventArgs e) { autoCompleteBox1.ItemsSource = e.Result; autoCompleteBox1.PopulateComplete(); } The snippets above will show on how to use the autocompleteBox using the data from database that bind in DataGrid. But what if we want to show the result on DataGrid while the autocomplete changing the items source? Ok just add one line to c_GetListByNameCompleted void c_GetListByNameCompleted(object sender, GetListByNameCompletedEventArgs e) { autoCompleteBox1.ItemsSource = e.Result; autoCompleteBox1.PopulateComplete(); dataGrid1.ItemsSource = e.Result; }

    Read the article

  • jQuery AutoComplete select firing after change?

    - by Zarigani
    I'm using the jQuery UI AutoComplete control (just updated to jQuery UI 1.8.1). Whenever the user leaves the text box, I want to set the contents of the text box to a known-good value and set a hidden ID field for the value that was selected. Additionally, I want the page to post back when the contents of the text box are changed. Currently, I am implementing this by having the autocomplete select event set the hidden id and then a change event on the text box which sets the textbox value and, if necessary, causes a post back. If the user just uses the keyboard, this works perfectly. You can type, use the up and down arrows to select a value and then tab to exit. The select event fires, the id is set and then the change event fires and the page posts back. If the user starts typing and then uses the mouse to pick from the autocomplete options though, the change event fires (as focus shifts to the autocomplete menu?) and the page posts back before the select event has a chance to set the ID. Is there a way to get the change event to not fire until after the select event, even when a mouse is used? $(function() { var txtAutoComp_cache = {}; var txtAutoComp_current = { label: $('#txtAutoComp').val(), id: $('#hiddenAutoComp_ID').val() }; $('#txtAutoComp').change(function() { if (this.value == '') { txtAutoComp_current = null; } if (txtAutoComp_current) { this.value = txtAutoComp_current.label ? txtAutoComp_current.label : txtAutoComp_current; $('#hiddenAutoComp_ID').val(txtAutoComp_current.id ? txtAutoComp_current.id : txtAutoComp_current); } else { this.value = ''; $('#hiddenAutoComp_ID').val(''); } // Postback goes here }); $('#txtAutoComp').autocomplete({ source: function(request, response) { var jsonReq = '{ "prefixText": "' + request.term.replace('\\', '\\\\').replace('"', '\\"') + '", "count": 0 }'; if (txtAutoComp_cache.req == jsonReq && txtAutoComp_cache.content) { response(txtAutoComp_cache.content); return; } $.ajax({ url: 'ajaxLookup.asmx/CatLookup', contentType: 'application/json; charset=utf-8', dataType: 'json', data: jsonReq, type: 'POST', success: function(data) { txtAutoComp_cache.req = jsonReq; txtAutoComp_cache.content = data.d; response(data.d); if (data.d && data.d[0]) { txtAutoComp_current = data.d[0]; } } }); }, select: function(event, ui) { if (ui.item) { txtAutoComp_current = ui.item; } $('#hiddenAutoComp_ID').val(ui.item ? ui.item.id : ''); } }); });

    Read the article

  • JQGrid and JQuery Autocomplete

    - by Neff
    When implementing JQGrid 4.3.0, Jquery 1.6.2, and JQuery UI 1.8.16 Ive come across an issue with the Inline edit. When the inline edit is activated, some of the elements get assigned an auto complete. When the inline edit is canceld or saved, the auto complete does not always go away (selecting text by double clicking it then hitting delete, then hitting escape to exit row edit). Leaving the auto complete controls in edit mode when the row is no longer considered in edit mode. Perhaps you can tell me if there is a problem with the initialization or if I you are aware of an event post-"afterrestorefunc" that the fields can be returned to their "original" state. Original state being displayed as data in the JQGrid row. I've tried removing the DOM after row close, .remove() and .empty(): ... "afterrestorefunc": function(){ $('.ui-autocomplete-input').remove(); } ... but that causes other issues, such as the jqgrid is not able to find the cell when serializing the row for data or edit, and requires a refresh of the page, not just jqgrid, to be able to once again see the data from that row. Auto complete functionality for the element is created on the double click of the row: function CreateCustomSearchElement(value, options, selectiontype) { ... var el; el = document.createElement("input"); ... $(el).autocomplete({ source: function (request, response) { $.ajax({ url: '<%=ResolveUrl("~/Services/AutoCompleteService.asmx/GetAutoCompleteResponse") %>', data: "{ 'prefixText': '" + request.term + "', 'contextKey': '" + options.name + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", success: function (data) { response($.map(data.d, function (item) { return { label: Trim(item), value: Trim(item), searchVal: Trim(item) } })) } }); }, select: function (e, item) { //Select is on the event of selection where the value and label have already been determined. }, minLength: 1, change: function (event, ui) { //if the active element was not the search button //... } }).keyup(function (e) { if (e.keyCode == 8 || e.keyCode == 46) { //If the user hits backspace or delete, check the value of the textbox before setting the searchValue //... } }).keydown(function (e) { //if keycode is enter key and there is a value, you need to validate the data through select or change(onblur) if (e.keyCode == '13' && ($(el).val())) { return false; } if (e.keyCode == '220') { return false } }); } Other Sources: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing http://api.jqueryui.com/autocomplete/ Update: I tried only creating the autocomplete when the element was focused, and removing it when onblur. That did not resolve the issue either. It seems to just need the autocomplete dropdown to be triggered.

    Read the article

  • Bassistance Autocomplete Plugin - Search Page Replacement

    - by Dante
    Hi, i've setup an autocomplete field that searches my database which works fine: $("#autocomplete input#lookupAccount").autocomplete("lib/php/autocomplete_backend.php", { width: 300, selectFirst: false, delay: 250 }); When a user clicks on a result I want to refer them to another page depending on what they've been clicking. In the documentation I find the following: Search Page Replacement An autocomplete plugin can be used to search for a term and redirect to a page associated with a resulting item. The following is one way to achieve the redirect: var data = [ {text:'Link A', url:'/page1'}, {text:'Link B', url: '/page2'} ]; $("...").autocomplete(data, { formatItem: function(item) { return item.text; } }).result(function(event, item) { location.href = item.url; }); So i need to return the following from my PHP file : {text:'link A', url:'/page1'},... But my PHP file now returns $returnData = "<ul>"; if(isset($results)){ for($j=0; $j < count($results); $j++){ if($results[$j][0] == "account"){ if($j % 2){ $returnData .= "<li>".$results[$j][1]."<br /><i>".$results[$j][2].", ".$results[$j][3]." ".$results[$j][4]."</i></li>"; } else { $returnData .= "<li style=\"background: blue\">".$results[$j][1]."<br /><i>".$results[$j][2].", ".$results[$j][3]." ".$results[$j][4]."</i></li>"; } } else { $returnData .= "<li style=\"background: yellow\"><i>".$results[$j][1]."</i> (".$results[$j][2].")</li>"; } } $returnData .= "</ul>"; echo $returnData; } else { echo "Sorry geen resultaten!"; } So it loops through an array and returns an li value depending on what it finds in the array. How can I match that with: {text:'link A', url:'/page1'}???

    Read the article

  • jquerymobile conflict with autocomplete : $this.attr("href") is undefined

    - by sweets-BlingBling
    When I use jquery ui autocomplete version 1.8.5 with jquery mobile alpha 2. I get an error when I click an item from the autocomplete list: $this.attr("href") is undefined. Does anyone know any fix for it? EDITED: <html> <head> <link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.custom.css"> <link rel="stylesheet" type="text/css" href="css/autocomplete.css"> </head> <body> <div id="formWrap"> <form id="messageForm" action="#"> <fieldset> <label id="toLabel">select:</label> <div id="friends" class="ui-helper-clearfix"> <input id="to" type="text"> </div> </fieldset> </form> </div> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery.mobile-1.0a2.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script> <script type="text/javascript"> $(function(){ var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; //attach autocomplete $("#to").autocomplete({ source:availableTags , //define select handler select: function(e, ui) { var contact = ui.item.value; createSpan(contact); $("#to").val("").css("top", 2); return false; } }); }); function createSpan(contact){ //create formatted friend span = $("<span>").text(contact) //add contact to contact div span.insertBefore("#to"); } </script> </body> </html>

    Read the article

  • Jquery Plugins/Autocomplete Special Char problem

    - by Yetkin EREN
    Hi; i use that plugin for autocomplate; docs.jquery.com/Plugins/Autocomplete but i have a problem with spacial chars. if a special char first char of a word, this char has being ignored and if its not first char, chars before that has being ignored. for example: "slk" cant found but if i type "lk" "slk" found and if i type öd "aöd" found. i made a test page; http://www.yetkineren.com/Autocomplete/oto.html and tahts the code thanks.. <html> <head> <meta http-equiv="Content-Language" content="tr"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> <script src="http://code.jquery.com/jquery-latest.js"></script> <link rel="stylesheet" href="jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="encoder.js"></script> <script type="text/javascript" src="Scripts/jquery.bgiframe.min.js"></script> <script type="text/javascript" src="Scripts/jquery.autocomplete.js"></script> <script> $(document).ready(function(){ var gata=[ {"text": '21.png resmi aöd', "value": '21.png'}, {"text": '21.png resmi cöd', "value": '21.png'}, {"text": '21.png resmi acd', "value": '21.png'}, {"text": '21.png resmi aéd', "value": '21.png'}, {"text": '42.png resmi ésd', "value": '42.png'}, {"text": '63.png resmi aId', "value": '63.png'}, {"text": '34.png resmi Çsd', "value": '34.png'}, {"text": '65.png resmi jkl', "value": '65.png'}, {"text": '65.png resmi Gkl', "value": '65.png'}, {"text": '65.png resmi ökl', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '65.png resmi lsk', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '36.png resmi &#351;lk', "value": '36.png'} ]; $('#eksampil').autocomplete(gata, { width: 300, scroll: true, scrollHeight: 300, matchContains: "word", mustMatch: true, formatItem: function(row, i) { return i+". result <img src='images/" + row.value + "'/> " + row.text }, formatMatch: function(row) { //Encoder.EncodeType="entity"; return row.text //Encoder.EncodeType="entity"; //Encoder.htmlDecode( //Encoder.htmlEncode(i); }, formatResult: function(row) { return row.text } }); }); </script> </head> <body> <br> type "re" for see all: <input id="eksampil" /><br> </body> </html>

    Read the article

  • autocomplete not working on one sever, works on others

    - by dogmatic69
    I have Ubuntu 10.10 x64 and x86 running on various servers and auto complete works on all of them bar one. The issue: apt-<tab> would show a list of options but sudo apt-<tab> would not. After fiddling with it for a few hours i've found that /etc/bash_autocomplete did not exist. on the broken server. Copying the one from a working one it now works. but still not properly. sudo apt-get ins<tab> does not show do anything. listing the files in /etc/bash_autocomplete.d/ on the working server has about 50 files, and the broken one only two or three. i dont think that i can just copy these files though as it might show commands for things that are not even installed. TL;DR autocomplete broken, how can i fix it. Seems like its disabled somewhere, why is this EDIT: Ok, it was not ever installed... $ sudo apt-get install bash-completion Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed bash-completion 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 140kB of archives. After this operation, 1,061kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu/ maverick-updates/main bash-completion all 1:1.2-2ubuntu1.1 [140kB] Fetched 140kB in 0s (174kB/s) Selecting previously deselected package bash-completion. (Reading database ... 23808 files and directories currently installed.) Unpacking bash-completion (from .../bash-completion_1%3a1.2-2ubuntu1.1_all.deb) ... Processing triggers for man-db ... Setting up bash-completion (1:1.2-2ubuntu1.1) ... its now kinda working, but still wonky... apt-get ins<tab> gives sudo apt-get insserv as the option. also apt-get install php5<tab> gives apt-get install php5/ not php5-* options.

    Read the article

  • Bypass all cacheing on jQuery.autocomplete(1.02)

    - by technicalbloke
    I am using jQuery.autocomplete(1.02) on my search box and I want exact string and substring matching. I don't care (yet!) about the database load, I'm happy for it to fire off a query every keystroke and bypass the caching entirely - I just don't want anything missed. To this end I have tried setting cacheLength=1, the minimum permitted, but the autocomplete function refuses to fire off a GET request for each key up. searchbox GET_request 'a' -> http://localhost/service_search_request?q=a 'ar' -> http://localhost/service_search_request?q=ar 'ars' -> http://localhost/service_search_request?q=ars Instead, it sends the first and the third and misses the second, giving me the wrong results for 'ar' :-/ I've cleared my cache and sessions but it looks like some sort of caching is still going on. AFAIK I have no proxying going on and I'm shift-refreshing each time. It looks likely then that this behavior is from jQuery.autocomplete itself. So my questions are... A) Does this seem likely? i.e. is it a feature, or maybe a bug? B) If so is there a clean way around it?... C) If not, what autocomplete would you use instead? Naturally D) No you're just using it incorrectly you douche! is always a possibility, and indeed the one I'd prefer having spent time going down this road - assuming it comes with a link to the docs I've failed to find / read! Cheers, Roger :)

    Read the article

  • JQuery UI Autocomplete showing as bullets

    - by awshepard
    The JQuery UI Demo page for autocomplete (link) has a nice looking search box and drop down with nice colors and highlights and such. When I implement it for myself, I end up with a bulleted list. How do I get my drop down of suggestions to look like theirs? A few notes/code fragments: I'm working in .NET land, so I'm using the <asp:ScriptManager> tag with <asp:ScriptReference>s inside it to get the hosted jquery.min.js (1.4.2) and jquery-ui.min.js (1.8.1) files from Google. My input box is fairly simple: <div class='ui-widget'> <label for="terms">Term: </label> <input id="terms" class="ui-autocomplete-input"> </div> My autocomplete looks like: $(""#terms"").autocomplete({source:""GetAttributesJSON.aspx"",minLength:2}); I get the correct data back, so that's not the issue. I just want fancy graphics. Any thoughts would be much appreciated.

    Read the article

  • jQuery Autocomplete Json Ajax cross browser issue with Google Search Appliance

    - by skyfoot
    I am implementing a jquery autocomplete on a search form and am getting the suggestions from the Google Search Appliance Autocomple suggestions service which returns a result set in json. What I am trying to do is go off to the GSA to get suggestions when the user types something in the search box. The url to get the json suggestions is as follows: http://gsaurl/suggest?q=<query>&max=10&site=default_site&client=default_frontend&access=p&format=rich The json which is returned is as follows: { "query":"re", "results": [ {"name":"red", "type":"suggest"}, {"name":"read", "type":"suggest"}] } The jQuery autocomplete code is as follows: $(#q).autocomplete(searchUrl, { width: 320, dataType: 'json', highlight: false, scroll: true, scrollHeight: 300, parse: function(data) { var array = new Array(); for(var i=0;i<data.results.length;i++) { array[i] = { data: data.results[i], value: data.results[i].name, result: data.results[i].name }; } return array; }, formatItem: function(row) { return row.name; } }); This works in IE but fails in firefox as the data returned in the parse function is null. Any ideas why this would be the case? Workaround I created an aspx page to call the GSA suggest service and to return the json from the suggest service. Using this page as a proxy and setting it as the url in the jQuery autocomplete worked in both IE and FireFox.

    Read the article

  • jquery: prepopulating autocomplete fields

    - by David Tildon
    I'm using the tokenizing autocomplete plugin for jquery ( http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry ). I mostly use Ruby, and I'm really unfamiliar with javascript, though. My basic setup looks like this, and works fine for a new, blank form: $(document).ready(function () { $("#tag_ids_field").tokenInput("/tags", { queryParam: "search" }); }); The problem comes when I try to prepopulate it, like for an edit page. I'm trying to do something like this (where the "#tag_ids_field" text box contains the JSON when the page is loaded - that way is just cleaner on the application side of things). $(document).ready(function () { var tags = $("#tag_ids_field").html(); $("#tag_ids_field").tokenInput("/tags", { queryParam: "search", prePopulate: tags }); }); However, when the page loads I see that it's just filled with hundreds of entries that read 'undefined'. I get this even if I take the JSON output that Rails provides and try sticking it right in the .js file: $(document).ready(function () { $("#tag_ids_field").tokenInput("/tags", { queryParam: "search", prePopulate: "[{\"id\":\"44\",\"name\":\"omnis sit impedit et numquam voluptas enim\"},{\"id\":\"515\",\"name\":\"deserunt odit id doloremque reiciendis aliquid qui vel\"},{\"id\":\"943\",\"name\":\"exercitationem numquam possimus quasi iste nisi illum\"}]" }); }); That's obviously not a solution, I just tried it out of frustration and I get the same behavior. My two questions: One, why are my text boxes being filled with "undefined" tags when I try to prepopulate, and how can I get them to prepopulate successfully? Two, I'm planning on having many autocomplete fields like this on the same page (for when several records are edited at once - they all query the same place). How can I make each autocomplete field take it's prepopulated values from it's own textbox? Something like (applying these settings to all input boxes with a certain class, not just the one of a particular id): $(document).ready(function () { $(".tag_ids_field").tokenInput("/tags", { queryParam: "search", prePopulate: (the contents of that particular ".tag_ids_field" input box) }); });

    Read the article

  • jQuery autocomplete for dynamically created inputs

    - by Jamatu
    Hi all! I'm having an issue using jQuery autocomplete with dynamically created inputs (again created with jQuery). I can't get autocomplete to bind to the new inputs. Autocomplete $("#description").autocomplete({ source: function(request, response) { $.ajax({ url: "../../works_search", dataType: "json", type: "post", data: { maxRows: 15, term: request.term }, success: function(data) { response($.map(data.works, function(item) { return { label: item.description, value: item.description } })) } }) }, minLength: 2, }); New table row with inputs var i = 1; var $table = $("#works"); var $tableBody = $("tbody",$table); $('a#add').click(function() { var newtr = $('<tr class="jobs"><td><input type="text" name="item[' + i + '][quantity]" /></td><td><input type="text" id="description" name="item[' + i + '][works_description]" /></td></tr>'); $tableBody.append(newtr); i++; }); I'm aware that the problem is due to the content being created after the page has been loaded but I can't figure out how to get around it. I've read several related questions and come across the jQuery live method but I'm still in a jam! Any advice?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >