Search Results

Search found 47 results on 2 pages for 'autosuggest'.

Page 1/2 | 1 2  | Next Page >

  • Drupal location autosuggest doesn't recognize provinces

    - by harry_T
    I am using Drupal Location module in CCK to retreive longitude & latitude based on location (stree/city/state). There is an automatic autosuggest for State, but unfortunately recognizes only US states. I set default country to Canada, but autosuggest still only recognized US states. Is there a way to get autosuggest function to recognize Canadian provinces or to disable this feature. thanks!

    Read the article

  • JQUERY, AutoSuggest that doesn't kill the Server on ever keyup

    - by nobosh
    I'm working to build a JQUERY enabled AutoSuggest plugin, inspired by Apple's spotlight. Here is the general code: $(document).ready(function() { $('#q').bind('keyup', function() { if( $(this).val().length == 0) { // Hide the q-suggestions box $('#q-suggestions').fadeOut(); } else { // Show the AJAX Spinner $("#q").css("background-image","url(/images/ajax-loader.gif)"); $.ajax({ url: '/search/spotlight/', data: {"q": $(this).val()}, success: function(data) { $('#q-suggestions').fadeIn(); // Show the q-suggestions box $('#q-suggestions').html(data); // Fill the q-suggestions box // Hide the AJAX Spinner $("#q").css("background-image","url(/images/icon-search.gif)"); } }); } }); The issue I want to solve well & elegantly, is not killing the sever. Right now the code above hits the server every time you type a key and does not wait for you to essentially finish typing. What's the best way to solve this? A. Kill previous AJAX request? B. Some type of AJAX caching? C. Adding some type of delay to only submit .AJAX() when the person has stopped typing for 300ms or so? Thanks

    Read the article

  • Efficient AutoSuggest with jQuery?

    - by nobosh
    I'm working to build a jQuery AutoSuggest plugin, inspired by Apple's spotlight. Here is the general code: $(document).ready(function() { $('#q').bind('keyup', function() { if( $(this).val().length == 0) { // Hide the q-suggestions box $('#q-suggestions').fadeOut(); } else { // Show the AJAX Spinner $("#q").css("background-image","url(/images/ajax-loader.gif)"); $.ajax({ url: '/search/spotlight/', data: {"q": $(this).val()}, success: function(data) { $('#q-suggestions').fadeIn(); // Show the q-suggestions box $('#q-suggestions').html(data); // Fill the q-suggestions box // Hide the AJAX Spinner $("#q").css("background-image","url(/images/icon-search.gif)"); } }); } }); The issue I want to solve well & elegantly, is not killing the sever. Right now the code above hits the server every time you type a key and does not wait for you to essentially finish typing. What's the best way to solve this? A. Kill previous AJAX request? B. Some type of AJAX caching? C. Adding some type of delay to only submit .AJAX() when the person has stopped typing for 300ms or so?

    Read the article

  • jquery autosuggest not firing (webform)

    - by Abu Hamzah
    is that something wrong in the below code? its not firing at all $(document).ready(function() { $("#<%=txtHost.ClientID%>").autocomplete("HostService.asmx/GetHosts",{ dataType: 'json' ,contentType: "application/json; charset=utf-8" ,parse: function(data){ var rows = Array(); debugger for(var i = 0; i<data.length; i++){ rows[i] = {data:data[i], value:data[i].LName, result:data[i].LName}; } return rows; } ,formatItem: function(row, i, max){ return data.LName + ", " + data.FName; } }); }); <script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script> <asp:TextBox ID="txtHost" runat='server'></asp:TextBox>

    Read the article

  • Solr Autosuggest

    - by rahul
    Hi, I am using Solr (1.4) AutoSuggest feature using termsComponent. Currently, if I type 'goo' means, Solr suggest words like 'google'. But I would like to receive suggestions like 'google, google alerts, ..' . ie, suggestions with single and multiple terms. Not sure, whether I need to use edgengrams for that. for eg, indexing google like 'go', 'oo', 'og', ... . But I think I don't need this, Since I don't want partial search. Please let me know if there is any way to do multiple word suggestions . Thanks in Advance.

    Read the article

  • drew's autoSuggest plugin help with AJAX results not showing

    - by s2xi
    hey guys, i use drew's autoSuggest plugin for some time but up until now I have hard coded my data into my JS, I'm trying to see if I can use AJAX to return the JSON data and query data like that. I seem to have it working but no matter what I try I can't get the results to be shown in the drop down UL it creates via jquery. The JSON comes back as it should. This is my PHP code: $input = $_GET["q"]; $data = array(); // query your DataBase here looking for a match to $input $query = mysql_query("SELECT `state`, `idStates` FROM `states_list` WHERE (`state` LIKE '%{$input}%' OR `abbr` LIKE '%{$input}%')"); while ($row = mysql_fetch_assoc($query)) { $json = array(); $json['value'] = $row['idStates']; $json['name'] = $row['state']; $data[] = $json; } header("Content-type: application/json"); echo json_encode($data); and my JS: $('#state').autoSuggest('resources/ajax/suggest.php', {matchCase: true, minChars: 2, startText: '', emptyText: '', retrieveComplete: function(data){ console.log(data.value) }}); I have been trying to debug so I added the retrieveComplete parameter in there for that. the PHP returns the AJAX with the JSON content...now just to figure out how to get the JS to pick it up append it to the UL LI UPDATE: I appened the data to a test div and its returning results:[object Object],[object Object],[object Object]

    Read the article

  • autosuggest in textare with remove icon

    - by Bharanikumar
    am doing simple messaging system, For compose the message , i have given the textarea ,i want autosuggest in the textarea also i need somthing like reove icon, can u tell me how to this sort of function , i thing some the jquery plugin do these.. can u tell that name , For clear view of my expecation plase see the image... Thanks

    Read the article

  • jQuery autosuggest example

    - by RUtt
    I need to implement an "autosuggest" feature on our site but it needs to re-query the on every keystroke after a certain number of keys (like every character after 2 it would need to query again). So the result isn't a limiting search. For example, the autocomplete plugins I've seen work like the following: [looking for a county] 1. customer types 'CA' and the first result would return 'Canada', 'Cambodia', and 'Camaroon' 2. customer continues to type and hits 'M' the new results would query within the only the existing 3 results (producing results of just 'Cambodia' and 'Camaroon') I need a solution that would be the equivalent of querying my datasource on each keystroke. I already have the ajax call that will return my results based on the "typed" params. For example (in the above example), it would need to make an ajax call passing 'ca' first and if the customer kept typing passing 'can' on the 3 character and so forth. Thanks.

    Read the article

  • Jquery autosuggest google maps - Load on selection

    - by user1738522
    At the moment, the Google map code works like this: When you start typing in the input box it loads a list of suggestions. Then when you click on one of these options from the list, it puts it into the input box. However, THEN you still have to click find to load up the result. I want to have it so when you click on an option from the autosuggest list, it automatically loads the result, without having to click "find" afterwards. This is the code I am working with. I hope I explained this question correctly. http://jsfiddle.net/BxG9H/

    Read the article

  • how to send on users profile page on selecting username( using jason autosuggest script)

    - by I Like PHP
    i m using auto suggest using Ajax Jason . now when a user select a user name , i want to send user on the link of that user name my jason data is coming in this way { query:'hel', suggestions:["hello world","hell boy ","bac to hell"], data:["2","26","34"] } now what i want that user goes to http://userProfile.php?uid=26 on select username(suppose user select "hell boy") how to do this??

    Read the article

  • jquery plugin - autoSuggest

    - by Abu Hamzah
    please help me to choose the best plug-in in my particular scenario, I am building a page where user will enter his/her first or last name initial and it will populate the name and I have around 25k records in my db. what do you guys recommend?

    Read the article

  • how to send on users profile page on selecting username( using json autosuggest script)

    - by I Like PHP
    i m using auto suggest using Ajax Json . now when a user select a user name , i want to send user on the link of that user name my json data is coming in this way { query:'hel', suggestions:["hello world","hell boy ","bac to hell"], data:["2","26","34"] } now what i want that user goes to http://userProfile.php?uid=26 on select username(suppose user select "hell boy") how to do this?? UPDATE: i describe what i m doing step by step i m using a searchbox using jquery ajax, when user write some text on input box , we show (suggest) value regarading their search STEP 1. when user write atleast(2 letter) <input type="text" name="q" id="query" />then a function(below) in invoked in which i send the value written on text box(eg. hell). <script type="text/javascript" language="javascript"> var options, a; jQuery(function(){ options = { serviceUrl:'rpc.php' }; var a = $('#query').autocomplete({ serviceUrl:'rpc.php', minChars:3, delimiter: /(,|;)\s*/, // regex or character maxHeight:400, width:300, zIndex: 9999, deferRequestBy: 0, //miliseconds }); }); </script> STEP 3: on rpc.php, i collect the data and show using JSON my final data come in below format { query:'hell', suggestions:["hello world","hell boy ","bac to hell"], data:["2","26","34"] } where suggestion list having username and data is userid( from user_tables). above data comes in a div (on frontend) where user name displayed in a list STEP 4: now if i select any username using uparrow, downarrow then that name is filled in input box, STEP 5: now what i want that when user select usename then page automatically goes to that user's profile section ( userprofile.php?uid=2)

    Read the article

  • How can get autosuggest in cake php

    - by rajesh
    i hav entered my code in controller like below function keyup(){ $this-Note-simple(); if(strlen($searchq)0){ while ($row = mysql_fetch_array($getRecord)) { echo $row['name']; echo $row['department']; } return $row; } } as soon as i entered this one it doesn't display any info .... what correction should require.......

    Read the article

  • jquery autosuggest: what is wrong with this code?

    - by Abu Hamzah
    i have been struggling to make it work my autosugest/autocomplete and its acting strange unless i am doing completely silly here. please have a look 1) does not do anything, does not work or nor fire the event. <script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="Scripts/jquery.autocomplete.js" type="text/javascript"></script> <form id="form1" runat="server"> <script type="text/javascript"> $(document).ready(function() { $("#<%=txtHost.UniqueID %>").autocomplete("HostService.asmx/GetHosts", { dataType: 'json' , contentType: "application/json; charset=utf-8" , parse: function(data) { var rows = Array(); debugger for (var i = 0; i < data.length; i++) { rows[i] = { data: data[i], value: data[i].LName, result: data[i].LName }; } return rows; } , formatItem: function(row, i, max) { return data.LName + ", " + data.FName; } }); }); </script> 2) this works if i remove the above code and replace with this code: <script type="text/javascript"> $(document).ready(function() { $("#txtHost").autocomplete("lazy blazy crazy daisy maisy ugh".split(" ")); }); </script> any help ?

    Read the article

  • Algorithm for autocomplete?

    - by StackUnderflow
    I am referring to the algorithm that is used to give query suggestions when a user type a search term in google. I am mainly interested in how google algorithm is able to show: 1. Most important results (most likely queries rather than anything that matches) 2. Match substrings 3. Fuzzy matches I know you could use Trie or generalized trie to find matches but it wouldn't meet the above requirements... Similar questions asked earlier here Thanks

    Read the article

  • FCBKcomplete, Create a new TAG with Commas as opposed to Enter

    - by nobosh
    Currently, FCBKcomplete created new tags after you type something in and press enter. Is there a way to get the plug-in to allow for comma's (which is how tags are commonly separated) to create new tags? I'd hate to have to try to retrain users to user enter as opposed to the more standard comma separator. Plugin: http://www.emposha.com/javascript/fcbkcomplete.html Demo (use the second control): http://www.emposha.com/demo/fcbkcomplete_2/

    Read the article

  • dbpedia auto-suggest labels

    - by Sid
    Wikipedia has a auto-suggest feature on its search field. If you for instance type in "mars" it lists a few items including Mars, Marseille, Marsh. I am looking to implement something similar working off the latest DBpedia export (wikipedia in database form). If I do a search for all labels in the labels_en.nt file that DBpedia offer that begin with "mars" then, even if I remove ones that redirect on to others that are listed, I end up with a huge list. In trying to understand how wikipedia does this I noticed that I'm actually querying this URL which returns a JSON string. Now my problem is that I don't know how wikipedia narrows the list down. Perhaps it does so based on page popularity. The higher views/edits a page has the higher it goes in this suggestion box. If so, does DBpedia export this information?

    Read the article

  • JQuery autocomplete: is not working asp.net

    - by Abu Hamzah
    is that something wrong in the below code? its not firing at all edit <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HostPage.aspx.cs" Inherits="HostPage" %> <!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 runat="server"> <title>Untitled Page</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script> </head> <body> <form id="form1" runat="server"> <script type="text/javascript"> $(document).ready(function() { $("#<%=txtHost.UniqueID %>").autocomplete("HostService.asmx/GetHosts", { dataType: 'json' , contentType: "application/json; charset=utf-8" , parse: function(data) { var rows = Array(); debugger for (var i = 0; i < data.length; i++) { rows[i] = { data: data[i], value: data[i].LName, result: data[i].LName }; } return rows; } , formatItem: function(row, i, max) { return data.LName + ", " + data.FName; } }); }); </script> <div> <asp:Label runat="server" ID='Label4' >Host Name:</asp:Label> <asp:TextBox ID="txtHost" runat='server'></asp:TextBox> <p> </div> </form> </body> </html>

    Read the article

  • How to get back to auto-completion after misspelling of a methodname in Eclipse?

    - by Jonas
    When I am coding Java in Eclipse I like the auto-completion feature. With that I mean the popup with method-names that comes when you start typing in a method name for an object. Or maybe it's called something different, i.e. method-suggestions? But the popup is hidden if I misspells a method name, and it doesn't come back if I delete the misspelled part of the method name. Is there any way to get back the popup after a misspelling without starting to type in the hole methodname again?

    Read the article

  • Restrict number of characters to be typed for af:autoSuggestBehavior

    - by Arunkumar Ramamoorthy
    When using AutoSuggestBehavior for a UI Component, the auto suggest list is displayed as soon as the user starts typing in the field. In this article, we will find how to restrict the autosuggest list to be displayed till the user types in couple of characters. This would be more useful in the low latency networks and also the autosuggest list is bigger. We could display a static message to let the user know that they need to type in more characters to get a list for picking a value from. Final output we would expect is like the below image Lets see how we can implement this. Assuming we have an input text for the users to enter the country name and an autosuggest behavior is added to it. <af:inputText label="Country" id="it1"> <af:autoSuggestBehavior /> </af:inputText> Also, assuming we have a VO (we'll name it as CountryView for this example), with a view criteria to filter out the VO based on the bind variable passed. Now, we would generate View Impl class from the java node (including bind variables) and then expose the setter method of the bind variable to client interface. In the View layer, we would create a tree binding for the VO and the method binding for the setter method of the bind variable exposed above, in the pagedef file As we've already added an input text and an autosuggestbehavior for the test, we would not need to build the suggested items for the autosuggest list.Let us add a method in the backing bean to return us List of select items to be bound to the autosuggest list. padding: 5px; background-color: #fbfbfb; min-height: 40px; width: 544px; height: 168px; overflow: auto;"> public List onSuggest(String searchTerm) { ArrayList<SelectItem> selectItems = new ArrayList<SelectItem>(); if(searchTerm.length()>1) { //get access to the binding context and binding container at runtime BindingContext bctx = BindingContext.getCurrent(); BindingContainer bindings = bctx.getCurrentBindingsEntry(); //set the bind variable value that is used to filter the View Object //query of the suggest list. The View Object instance has a View //Criteria assigned OperationBinding setVariable = (OperationBinding) bindings.get("setBind_CountryName"); setVariable.getParamsMap().put("value", searchTerm); setVariable.execute(); //the data in the suggest list is queried by a tree binding. JUCtrlHierBinding hierBinding = (JUCtrlHierBinding) bindings.get("CountryView1"); //re-query the list based on the new bind variable values hierBinding.executeQuery(); //The rangeSet, the list of queries entries, is of type //JUCtrlValueBndingRef. List<JUCtrlValueBindingRef> displayDataList = hierBinding.getRangeSet(); for (JUCtrlValueBindingRef displayData : displayDataList){ Row rw = displayData.getRow(); //populate the SelectItem list selectItems.add(new SelectItem( (String)rw.getAttribute("Name"), (String)rw.getAttribute("Name"))); } } else{ SelectItem a = new SelectItem("","Type in two or more characters..","",true); selectItems.add(a); } return selectItems; } So, what we are doing in the above method is, to check the length of the search term and if it is more than 1 (i.e 2 or more characters), the return the actual suggest list. Otherwise, create a read only select item new SelectItem("","Type in two or more characters..","",true); and add it to the list of suggested items to be displayed. The last parameter for the SelectItem (boolean) is to make it as readOnly, so that users would not be able to select this static message from the displayed list. Finally, bind this method to the input text's autosuggestbehavior's suggestedItems property. <af:inputText label="Country" id="it1"> <af:autoSuggestBehavior suggestedItems="#{AutoSuggestBean.onSuggest}"/> </af:inputText>

    Read the article

  • Calling local function with Jquery

    - by Bug Magnet
    I have a JQuery function as followss: (function($){ $.fn.autoSuggest = function(data, options) { function add_selected_item(data, num){ (function($){ $.fn.autoSuggest = function(data, options) { alert(data); } }); } }); If I wanted to call the local add_selected_item() function from outside this function, how would I do it? I've tried doing: $.autoSuggest.add_selected_item(data, opt); But am getting an $.autoSuggest is undefined. Still learning the ropes with JQUery. I am not sure exactly how this can be accomplished, if at all. Thanks!

    Read the article

  • How to make autocompleting textbox in vb6 like this one?

    - by Amit Kumar Jha
    hey all, well i want to have an autocompleting textbox like the one in the image below: this screenshot is from an accounting software. whenever the user focuses on a textbox and starts typing something the suggestions just popup under the control (as seen in the image under the Purc type textbox).This autosuggest functionality even works in the cells of the grid shown in the picture.Moreover the fields in which this autosuggest is enabled allows only values from the autosuggest list to be filled up and nothing else. i want to emulate similar functionality in my app in vb6. so if you could please guide me in the right direction i would be very grateful. thanks in advance to all those who take out time to reply.

    Read the article

  • LOV's autoSuggestBehaviour

    - by raghu.yadav
    af:autoSuggestBehaviour component example works pretty straight forward on LOV's in input form and Table'sgood example by juan here http://www.oracle.com/technology/products/jdev/howtos/autosuggest/explaining_autosuggestbehavior.htm,

    Read the article

1 2  | Next Page >