Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable google chrome suggestion list when using twitter bootstrap typeahead?

using twitter bootstrap typeahead i get google chrome suggestion list above typeahead list

 $(document).ready(function () {
        $("[ID$=TextBox]").typeahead({ source: ["aaa", "aab", "aac", "aad"] });
    });

<asp:TextBox ID="TextBox" runat="server" data-provide="typeahead"></asp:TextBox>

enter image description here

like image 719
George Botros Avatar asked Mar 05 '12 11:03

George Botros


People also ask

How do you turn off predictive URL?

Disable Autocomplete Searches and URLsLaunch the Chrome browser and go to its Settings page. Then head over to the Sync and Google Services section. Finally, disable the Autocomplete searches and URLs toggle under Other Google services.


2 Answers

[Follow-up from the comment section above]

You can turn off that feature on the input box that the typehead is referenced from by setting the autocomplete function off like so:

autocomplete="off" 
like image 141
Andres Ilich Avatar answered Sep 21 '22 12:09

Andres Ilich


As Andres Ilich mentioned, adding autocomplete="off"attribute should do the trick. It is mentioned in W3 draft: http://www.w3.org/Submission/web-forms2/#the-autocomplete

I do not know much about ASP.NET and so I do not know whether that attribute is supported in tag. When I browsed w3school (http://www.w3schools.com/aspnet/prop_webcontrol_textbox_autocompletetype.asp) I got this as familiar option AutoCompleteType="None". But I am not sure of this.

I think in jQuery you can implement something like this:

$("[ID$=TextBox]").attr("autocomplete", "off");

like image 31
Harshith J.V. Avatar answered Sep 20 '22 12:09

Harshith J.V.