Skip to main content

Posts

Showing posts from April, 2012

How to handle autocomplete in browsers

Sometimes we face a problem while opening forms. There are some fields in the form that are always pre-filled whenever that form is opened. This is because of the auto-fill feature of the browser. To solve that simple put the autocomplete="off" in form tag like below: <form name="frmUser" method="post" action="test" autocomplete="off"> Name : <input type="text" name="name" /> </form> According to the mozilla https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion  this happens because we are using the the two fileds in our form i.e. NAME and ADDRESS.  Like in the above form we have used the label Name . To resolve this issue we can do the following: Simply include the name using span as below <form name="frmUser" method="post" action="test" autocomplete="off"> < Name : <input type="text" name="abc"