SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2005
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Autocomplete="off" & XHTML Compliance

    Hi there all,

    I am trying to build a code that is XHTML compliant and can't seem to find an alternative to the autocomplete="off" which is not part of the compliance allowance.

    Can anyone suggest maybe a javascript alternative to disable autocompletion in web forms?

    Thanks a lot!

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,253
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    autocomplete

    To my knowledge the autocomplete attribute is IE only. I think the easiest way to "turn off" autocomplete would be to purposely avoid naming the form's inputs with the common input names. For example, instead of using names like "name", "address", and "email", you could use names like "field1", "field2", and "field3".

  3. #3
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,868
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Just because more than one browser supports something doesn't make it a part of the standards. If you want to write standard compliant pages you should use the standards provided way of doing things. Since autocomplete is part of the browser functionality and not a part of the page you shouldn't be trying to change it from within your page in the first place.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    Maniacally depressed robot poncho's Avatar
    Join Date
    Dec 2004
    Location
    Belfast, N.Ireland
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall
    Just because more than one browser supports something doesn't make it a part of the standards. If you want to write standard compliant pages you should use the standards provided way of doing things. Since autocomplete is part of the browser functionality and not a part of the page you shouldn't be trying to change it from within your page in the first place.
    I like the cut of your jib
    Perfecting the art of breaking stuff.
    Check 'em: CakePHP | TextMate


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •