Re: autocomplete=off

On Fri, 23 Sep 2005, Andy Harris wrote:
>
> I apologise if this has been covered before, but I'm trying to code a 
> page with a textbox for entering credit card numbers.
>
> It remembers previous entries unless I use the autocomplete=off 
> attribute, but that isn't valid XHTML. Are there plans to introduce this 
> or something similar to the next version, as the only 'valid' way I can 
> find is javascript and we don't want to be relying on that!

The autocomplete="" attribute has been added to the currently unofficial 
HTML5 proposals:

   http://whatwg.org/specs/web-forms/current-work/#the-autocomplete

It has not been added to any HTML 4.x or XHTML 1.x draft from the W3C, and 
I am not aware of any plans to add it. Note that the W3C HTML working 
group is primarily working on XHTML2 and XForms now. XForms is the W3C's 
next-generation forms language that is used in XHTML2, and XHTML2 is 
intended to replace HTML 4.x and XHTML 1.x as the Web's document language.

By the way, if you are using XHTML 1.x, even using JavaScript to add the 
attribute isn't valid. If you use JavaScript to add an invalid attribute, 
the page is technically non-conformant (although the validator won't catch 
that case and so won't report it).

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 30 September 2005 22:54:24 UTC