Forum Moderators: open

Message Too Old, No Replies

Stop browser saving text in field

         

FiRe

7:21 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



I know its not an official attribute, but I have seen input text boxes in the past that have an attribute that stops browsers such as firefox (and any form savers) from remebering any data for that input box.

<input type="text" name="q" size="40" />

Anyone have any idea?

encyclo

7:25 pm on Jan 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're looking for the attribute
[b]autocomplete="off"[/b]
- in most browsers this will stop the contents being saved - however it is possible for a browser-savvy end-user to override this option.

FiRe

9:57 pm on Jan 23, 2007 (gmt 0)

10+ Year Member



thats the one, thanks!

cmarshall

10:03 pm on Jan 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also use JavaScript to scrag the data (delay of half a second after load, clear the field and set the focus there). Some sites have their sensitive forms displayed in an ActiveX or Flash control (I HATE that technique, but it does work).