On my HTML page I have multiple text inputs. Every time I enter values in them, it shows me the previously entered values. Is it due to a browser property or HTML? How do I disable it?
Asked
Active
Viewed 1e+01k times
5 Answers
56
Always the better appraoch is to give form autocomplete="off"
<form autocomplete="off">
<input type="text" id="text1">
<input type="text" id="text2">
</form>
Then only newer versions of Eclipse support HTML5 tags such as autocomplete else it will show warning...

Arun Bertil
- 4,598
- 4
- 33
- 59
28
Just set the autocomplete
property of your textboxes to off. Like this...
<input type="email" name="email" autocomplete="off">

mohkhan
- 11,925
- 2
- 24
- 27
-
i tried that, it says "Undefined attribute name (autocomplete)" – Aditya Ponkshe Jul 23 '13 at 06:19
-
which browser are you using ? – mohkhan Jul 23 '13 at 06:20
-
chrome/firefox/ie testing on all of them as I want it to work on all known bowers – Aditya Ponkshe Jul 23 '13 at 06:22
-
well it is working, eclipse says "Undefined attribute name (autocomplete)" but it is working anyways, strange! – Aditya Ponkshe Jul 23 '13 at 06:24
-
1@AdityaPonkshe to clear things up, are you getting this "Undefined attribute name (autocomplete)" in your browser or developement environment? Because googling such error directs me to eclipse problems. – Ilu Jul 23 '13 at 06:24
-
@Puuskis yes i was getting it in eclipse in fact i am still getting it but it is working in browser. – Aditya Ponkshe Jul 23 '13 at 06:25
-
1@AdityaPonkshe Yeah my bad, answered the same moment I guess :) There seems to be workarounds for such problems. Not too familiar with the eclipse, but worth a try: http://stackoverflow.com/questions/4193905/warnings-of-valid-html5-attributes-in-eclipse (just because it's annoying to see warnings) – Ilu Jul 23 '13 at 06:28
-
@AdityaPonkshe is this thing working... i dont think so..??y u have marked as answer? – Arun Bertil Jul 23 '13 at 06:31
-
@ArunBertil it is working, the problem is in eclipse, showing warning to a valid attribute. – Aditya Ponkshe Jul 23 '13 at 06:32
-
Ohh that is beacuse only newer versions of Eclipse support HTML5 tags allowed in HTML5....you can either add html5 tags add on.. – Arun Bertil Jul 23 '13 at 06:43
4
That solution helped me: if you are using google Chrome, try this: Put the mouse pointer on the entry that you want to delete, press Delete. If the entry is not removed, press Shift+Delete.

Carson
- 6,105
- 2
- 37
- 45

Sharon Nissanov
- 49
- 1
3
i think it is related to this question autocomplete
try to used javascript to add attribute autocomplete to your form
someForm.setAttribute( "autocomplete", "off" ); someFormElm.setAttribute( "autocomplete", "off" );
0
just try this lines below
$('input').each(function(k,v){
$(v).val('');
});
works fine with me

Fouad Mekkey
- 138
- 1
- 7