Click here to Skip to main content
15,564,017 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi friends


i created a text box to take the user name of client.

it is working my problem is if username is 'jana' and password is 'abc' it is loging in.


if jana log out and loging in again if he press j that jana previously entered is poping up i want to stop that popups can any one give idea

i am using javascript and html and php in my application
Posted
Updated 27-Aug-16 17:18pm

PHP
autocomplete="off"


is the argument that you are searching for. add it to your textbox and you'll succeed.
 
Share this answer
 
Comments
Ed Nutting 6-Feb-12 8:07am    
Unfortunately not supported in all versions of major browsers (not sure if latest ones support it properly) and it wont stop browsers such as IE and Chrome offering to save passwords which overrides traditional autocomplete - in other words, its the official solution but unofficially there isn't really a proper solution.... Could always use javascript to keep the password box empty until user actually starts typing in it (combination of change and keydown events would do!) Anyway, good answer, my 5.
TorstenH. 6-Feb-12 8:29am    
you mean to implement a custom text? hmm, could be better, yes.
But does the Listener implementation cause the text to flicker around?
Ed Nutting 6-Feb-12 8:34am    
It might do...but then again I haven't tried... In something like Chrome I doubt it would because its JavaScript engine and Rendering engine are both incredibly fast (by browser standards). However, something like IE 9 or 8 (not even gonna consider 7 or 6) would flicker - everything seems to flicker in those. But it still might be an improvement upon having stuff appear. Personally I wonder why OP wants to block auto fill - it usually means you are trying to do something the wrong way.... Auto fill is available to users for a reason...
TorstenH. 6-Feb-12 10:37am    
hmm, it's the Username text for a login. I guess he's trying to level up the security in not giving hints on the username.
Ed Nutting 6-Feb-12 11:08am    
So how's he going to make user not store details in plain text files I wonder? ;P
Hi,
Just want to add more...
If you want to disable autofill on all controls at the page, use autocomplete="off" on form:
ASP.NET
<form id="Form1" method="post" runat="server" autocomplete="off"></form>
 
Share this answer
 
Comments
QMasters 17-Jun-18 11:53am    
Not worked for me no matter adding to form or input.
Alternatively you may use Javascript
Disable IE/Firefox remember password?[^]
 
Share this answer
 
plz find this

Try:
<asp:textbox id="MyTextBox" autocompletetype="Disabled" runat="server" xmlns:asp="#unknown">



this renders as:

<input id="MyTextBox" name="MyTextBox" type="text" autocomplete="off" />

Source:
How to clear history from textboxes | The ASP.NET Forums[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900