21

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

George Botros
  • 3,733
  • 3
  • 25
  • 49

2 Answers2

33

[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"
Andres Ilich
  • 73,673
  • 21
  • 152
  • 136
  • Just a note for clarity that "autocomplete" is only HTML5, so if you're using some other DOCTYPE, it won't validate. – Quasipickle Mar 06 '12 at 21:47
4

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");

Harshith J.V.
  • 757
  • 5
  • 18