Search Results

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

Page 12/38 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Embeding a generic google search with autocomplete - not a custom site search

    - by picxelplay
    Most people's home page is google.com. My homepage is just a custom html page hosted on my computer. I do this because I am a web developer, and I have several projects that I work on a one time, so I like to have quick links to all of them. On that page I usually just have a Link to google.com for when I want to search. But below all of my quick links, I want to add a google search box (with Autocompletions). I first used a simple iframe to embed google.com into the page, but then my search results were confined to that iframe. I wanted to search for something, then my results would open in a new tab. I then came across this code snippet but it doesn't have Autocompletions: http://www.refactory.org/s/google_search/view/2 How can I add Autocompletions to this? Or is there a better way of doing it? Thanks in advance for any advice

    Read the article

  • Embeding a generic google search with autocomplete - not a custom site search

    - by picxelplay
    Most people's home page is google.com. My homepage is just a custom html page hosted on my computer. I do this because I am a web developer, and I have several projects that I work on a one time, so I like to have quick links to all of them. On that page I usually just have a Link to google.com for when I want to search. But below all of my quick links, I want to add a google search box (with Autocompletions). I first used a simple iframe to embed google.com into the page, but then my search results were confined to that iframe. I wanted to search for something, then my results would open in a new tab. I then came across this code snippet but it doesn't have Autocompletions: http://www.refactory.org/s/google_search/view/2 How can I add Autocompletions to this? Or is there a better way of doing it? Thanks in advance for any advice

    Read the article

  • Struts2 + jQuery Autocompletion (Solved, with DOJO :) )

    - by Luigi 1982
    I used the jQuery autocompletion for my Struts2 application. Pratically, my action made a list of strings that jQuery use. This is the script: $().ready(function() { $("#tag").autocomplete("/myAction/Action", { multiple : true, autoFill : true, minChars:1 }); }); During typing appear the box with the suggestions. The problem is that the box render another value, exactly render the code of my JSP ( links to CSS for the autocomplete plug-in). How can I solve this? This is my JSP: <html> <head> <script src="<%=request.getContextPath()%>/scripts/jquery-latest.js"></script> <link rel="stylesheet" href="<%=request.getContextPath()%>/scripts/main.css" type="text/css" /> <link rel="stylesheet" href="<%=request.getContextPath()%>/scripts/jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="<%=request.getContextPath()%>scripts/jquery.bgiframe.min.js"></script> <script type="text/javascript" src="/<%=request.getContextPath()%>/query.dimensions.js"></script> <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/jquery.autocomplete.js"></script> <script type="text/javascript"> $().ready(function() { $("#tag").autocomplete("/myAction/Action", { multiple : true, autoFill : true, minChars:1 }); }); </script> </head> <body> <s:form action="Action" theme="simple"> <s:iterator value="elencoMateriali" var="asd"> <s:property value="#asd" escape="false"/> </s:iterator> <s:textfield id="tag" name="tagField" label="tag" /> </s:form> </body>

    Read the article

  • Rails, JSON Object, jQuery, Auto-Complete

    - by Michael Waxman
    I'm using this jquery autocomplete plug-in with rails: http://docs.jquery.com/Plugins/Autocomplete I can't figure out how to format my results, both in my Rails controller and in my javascript file. I have something like this in my controller... @query = params[:q].downcase @json = User.all(:login => /^#{@query}/) respond_to do |format| format.js { render :json => @json.to_json(:only => "login"), :layout => false } end And then this in my script.js file... $("#form").autocomplete('/url', { width: 320, dataType: 'json', highlight: false, scroll: true, scrollHeight: 300 }) But I can't figure out how to parse the data, so my autocomplete just gets a raw array of all my results at once. How do I process the JSON in the script.js file and/or in my controller for it to work?

    Read the article

  • Jquery ajax auto complete problem

    - by squeaker
    Hi all, I'm having newbie problems resolving an ajax autocomplete script if anyone would like to offer advise? In my form i wish for users to select an event type (drop down box) which on selecting then displays a text box. This text box then offers a user the ability to autocomplete as they start typing, the options having been generated through AJAX depending on the event type selected. I'm using a mix of http://pengoworks.com/workshop/jquery/autocomplete.htm - to carry out the autocomplete and some basic jquery to identify the value of the event type selected. The problem I have within the code below is to pass the selected event type value, set as the variable 'caturl', into the 'extraParams:{cat:4}' replacing the 4 with the event type dynamically selected. Any help would be greatly received. $('#select').change(function() { $('.eventtype').hide(); $('#eventtype' + $(this).find('option:selected').attr('id')).show(); caturl = $('#select :selected').val(); }); $("#CityAjax").autocomplete( 'caturl.php', { delay:10, minChars:2, matchSubset:1, matchContains:1, cacheLength:10, onItemSelect:selectItem, onFindValue:findValue, formatItem:formatItem, extraParams:{cat:4}, autoFill:true });

    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

  • Autocomplete Extender with WCF Service

    - by BrunoSalvino
    I'm trying to use Ajax Control Toolkit's Autocomplete extender with a WCF Service. This question is almost what I'm looking for, one of the answers points to a tutorial but I can't get it to work. In my solution I have a web form application project and a WCF service library project. One of the properties of the Autocomplete extender is ServicePath which the tutorial points to a svc file: <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <asp:TextBox runat="server" ID="myTextBox" Width="300" autocomplete="off" /> <ajaxToolkit:AutoCompleteExtender runat="server" BehaviorID="AutoCompleteEx" ID="autoComplete1" TargetControlID="myTextBox" ServicePath="Autocomplete.svc" ServiceMethod="GetCompletionList" MinimumPrefixLength="0" CompletionInterval="1000" EnableCaching="true"> </ajaxToolkit:AutoCompleteExtender> </div> </form> Right now in ServicePath I'm pointing to the http address (http://localhost:8731/Design_Time_Addresses/WebApp.WcfServiceLibrary/ProductService/) that my WCF Service is running, but it just don't works.

    Read the article

  • How Do I Prevent a XSS Cross-Site Scripting Attack When Using jQueryUI Autocomplete

    - by theschmitzer
    I am checking for XSS vulnerabilities in a web application I am developing. This Rails app uses the h method to sanitize HTML it generates. It does, however, make use of the jQueryUI autocomplete widget (new in latest release), where I don't have control over the generated HTML, and I see tags are not getting escaped there. The data fed to autocomplete is retrieved through a JSON request immediately before display. I Possibilities: 1) Autocomplete has an option to sanitize I don't know about 2) There is an easy way to do this in jQuery I don't know about 3) There is an easy way to do this in a Rails controller I don't know about (where I can't use the h method) 4) Disallow < symbol in the model Sugestions?

    Read the article

  • jQuery UI autocomplete examples

    - by RUtt
    I'm hoping someone can help with this, I'm having a real difficult time getting jQueryUI's autocomplete to work with ajax in a asp.net app (not MVC). I can get it to make the ajax call but I'm not doing something right handling the response. Just for starters I'm trying to have autocomplete make an ajax call to 'GetSuggestions.aspx' which will return a hard coded string. I have it where it will make the call to GetSuggestions.aspx but I can't get it to return anything to the page. (My next step would be to have 'GetSuggestions.asxp' return a list of name/value pairs but I'll tackle that next). I'm using the example from here: http://jqueryui.com/demos/autocomplete/#remote with the exception of using 'source: "GetSuggestions.aspx" (instead of "search.php")

    Read the article

  • Autocomplete jQuery 1.8-UI JSON Format

    - by Kezzer
    I'm toying with the new autocomplete in jQuery 1.8-UI. I've provided data in the following format ["val1", "val2", "val3"] This is coming from a stored procedure but output as a string. For some reason this doesn't work at all, however, if I supply the same data using a javascript variable var data = ["val1", "val2", "val3"]; Then this works fine. <script type="text/javascript"> $(function() $("#txtClient").autocomplete({ source: "/intranet/common/scripts/IntranetLists.aspx?ListType=C" }); }); </script> I've got a page which supplies whatever data I want using query strings. It's more temporary, but it worked when I previously used bassistence's autocomplete. Any ideas?

    Read the article

  • autocomplete issue with iScroll

    - by user1434647
    I am using jQuery Autocomplete on my jQUeryMobile application. It works perfect. Now I'm trying to use iScroll.js to scroll through the list of looked up items. Here is what I'am doing, http://jsfiddle.net/uXbKY/39/ The problem is, iscroll is applying only for the first item of the suggestion box, where as I'm not able to scroll through entire list.Please help me if I'm missing anything in my code.Please help me to acheive this using iScoll. I found one more way that we can use custom touch based scrollbar for autocomplete box http://jsfiddle.net/uXbKY/2/ but there is a issue that, the custom scrollbar appears only for first search and it disappears from the suggastion box when list get refreshed, Please suggest me if we can fix this, because both options are fine for me for using my autocomplete in ipad and android. or if anyone thinks there's a better way to do this than with iScroll and jScrollPane, you are wel-come I'm open to suggestions. Thanks in Advance,

    Read the article

  • JSON + PHP + JQuery + Autocomplete problem...

    - by RohanCS
    Hi Everyone, Only started today but I'm having massive problems trying to understand JSON/AJAX etc, I've gotten my code this far but am stumped on how to return the data being pulled by the AJAX request to the jQuery Auto complete function. var autocomplete = new function (){ this.init = function() { $('#insurance_destination').autocomplete({source: lookup}); } function lookup(){ $.ajax({ url: "scripts/php/autocomplete.php", data: {query:this.term}, dataType: "json", cache : false, success: function(data) { for(key in data){ return { label: key, value: data[key][0] } } } }); } } And example of the JSON string being returned by a PHP script {"Uganda":["UGA","UK4","Worldwide excluding USA, Canada and the Carribbean"]}

    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

  • style ul with width to accommodate items

    - by Tallmaris
    Sorry I could not find a similar answer on SO. I have the following markup (generated by jquery ui autocomplete but this is not the issue here) <ul style="z-index: 1; display: block; border: thin solid red; width: 200px;"> <li> <a> <div style="font-size: 0.85em;"> <span style="float: right; padding-left: 10px; color: gray;"> United Kingdom </span> <span style="">text text text text text</span> </div> </a> </li> </ul> As you can see in this fiddle: http://jsfiddle.net/fVr8P/2/ the text wraps because the width is limited and the country span is "floating". What I would like would be for the width to enlarge to accommodate the full length, but if I put width: auto; it will expand to 100%. Background The ul is of course coming from jquery ui autocomplete. I am styling the results a bit using the autocomplete.html extension. Problem is that everything is working ok in firefox an chrome because the autocomplete is set to the correct width on creation. in IE this does not happen (width is too small) so the text wraps. I am hping to come to a simple css only solution, without fiddling around in jQuery.

    Read the article

  • Git autocomplete stopped working in Oh My ZSH

    - by Eric
    Help! My git autocomplete stopped working in Oh My ZSH. It was working, but now it is now. I'm not sure what changed, so I'm hoping someone can help me track down the problem. I've tried uninstalling and reinstalling but no luck, Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(git)

    Read the article

  • jQuery UI autocomplete combobox in a modal dialog

    - by Daveo
    I want to use a autocomplete combobox http://jqueryui.com/demos/autocomplete/#combobox within a modal dialog. However whenever I click on the down arrow (of the combobox) it causes a refresh that results in my modal window closing. How do I stop the refresh from occuring? (I am still new to jQuery) I am using UI 1.8 and jQuery 1.4.1.

    Read the article

  • disable browser autocomplete for ajax:AutoCompleteExtender

    - by Kyle
    I'm using the .net ajaxtoolkit control AutoCompleteExtender. It works great but my firefox autocomplete overrides the values that the extender is returning (the firefox one lays on top of the control's). is there a way to disable the browser's version of autocomplete so that the .net one takes precendence?

    Read the article

  • json with Autocomplete?

    - by acidzombie24
    I am using Jquery Autocomplete I am also using the formatItem. I would like the output to be <json.key: json.value ex Name: Adam However i cant get the json data using the 4th param and i am getting the full json string as the 4th param and one result. How do i use json with this? is another autocomplete recommended? (this one looks pretty good...)

    Read the article

  • Twitter Bootstrap TypeAhead to work like DropDown List / Select Tag with Autocomplete Feature

    - by Dinesh P.R.
    I want to have a DropDown List / < Select HTML Tag behaviour with AutoComplete Feature using Twitter Bootstrap TypeAhead. The link here achieves the feature of Combo Box where user can provide his own input also. I want to restrict the User to select only from the option provided. Is there any way to tweek the Twitter Bootstrap TypeAhead Plugin to emulate the behaviour of DropDown List / Tag with Autocomplete Feature. I have referred the Following question before posting Adding a dropdown button to Twitter bootstrap typeahead component

    Read the article

  • Simple Modal with Autocomplete in ASP.NET

    - by DanielJaymes
    Hello, I am quite new to this so any help is very much appreciated. I am generating a modal pop using Simple Modal, this works ok. I now want to add jquery autocomplete to the element txtEmail. When I run the page outside of Simple Modal I can use Autocomplete, however when the page is loaded through Simple Modal it does not work. I have checked to ensure the element is loaded, and it is allowing me to change the text color, but I can not add autocomplete to it. The code is /** * @author Daniel */ jQuery(function($) { $("input.ema, a.ema").click(function(e) { e.preventDefault(); $("#osx-modal-content").modal({ appendTo: 'form', overlayId: 'osx-overlay', containerId: 'osx-container', closeHTML: '<div class="close"><a href="#" class="simplemodal-close">X</a></div>', minHeight: 80, opacity: 65, position: ['0', ], overlayClose: true, onOpen: OSX.open, onClose: OSX.close, onShow: OSX.show }); }); var OSX = { container: null, open: function(d) { var self = this; $.ajax({ url: "/Message/UserMessage/", type: 'GET', dataType: 'html', // <-- to expect an html response success: function(result) { var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" "); $('div#osx-modal-data').html(result).find("#txtEmail").css('color', '#c00'); if ($('div#osx-modal-data').find("#txtEmail").length) { // implies *not* zero $('div#osx-modal-data').find("#txtEmail").autocomplete(data); alert('We found img elements on the page using "img"'); } else { alert('No txtEmail elements found'); } } }); self.container = d.container[0]; d.overlay.fadeIn('slow', function() { $("#osx-modal-content", self.container).show(); $('div#osx-modal-title').html("Send Email"); var title = $("#osx-modal-title", self.container); title.show(); d.container.slideDown('slow', function() { setTimeout(function() { var h = $("#osx-modal-data", self.container).height() + title.height() + 20; // padding d.container.animate({ height: h }, 200, function() { $("div.close", self.container).show(); $("#osx-modal-data", self.container).show(); }); }, 300); }); }) }, close: function(d) { var self = this; d.container.animate({ top: "-" + (d.container.height() + 20) }, 500, function() { self.close(); // or $.modal.close(); }); }, show: function(d) { // $('div#osx-modal-data').find("#txtEmail").css('color', '#ccc') } }; });

    Read the article

  • Detecting jQuery UI autocomplete

    - by Soldarnal
    How can I detect whether or not an input box is currently a jQuery UI autocomplete? There doesn't seem to be a native method for this, but I'm hoping there is something simple like this: if ($("#q").autocomplete) { //Do something } That conditional, however, seems to always return true.

    Read the article

  • how to ingore comma when returning json mvc

    - by Darcy
    Hi all, I'm returning JSON from my controller to my view in order to populate a jquery autocomplete textbox in MVC. The problem is, some of my data contains commas, and therefore is split by the autocomplete helper. Heres my code. Controller: public ActionResult GetData() { var data = repository.GetData(); return Json(data); } View (script): $.post("../MyController/GetData", function(data) { var evalData = eval(data) + ""; //formats the text $("#Data").autocomplete(evalData.split(","), { max: 500, matchContains: true }); }); As you can see, I am using the jquery .split helper to split the returned Json. Should I be using regex or should I go with a completely different approach?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >