views:

82

answers:

4

Hi. I wrote an autocompletion script for an input field on a website. It uses jQuery and works fine. It should look something like this:

autocomplete-1

Unfortunately, Firefox's own autocompletion gets in my way, overlapping some of the results: alt text

Is is it possible to prevent the Firefox autocompletion field from popping up? (Not only on my machine but for every user of the website)

+4  A: 

Add autocomplete="off" attribute to the input element in question. E.g.

<input autocomplete="off">

Also see this document.

BalusC
+1  A: 

Use autocomplete=off in the form or input element.

Mozilla Developer Central: How to Turn Off Form Autocompletion

Pekka
+1  A: 

Use autocomplete="off". It's not valid HTML-code, but widely adopted in browsers.

Harmen
+2  A: 

As BalusC already pointed out, you can use the autocomplete attribute but you can also add it to the form element so that it affects all elements:

<form method="post" action="handler.php" autocomplete="off">

Note that this attribute is not part of a standard but most browsers implement it nevertheless.

Tatu Ulmanen