W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2007

[whatwg] successful form controls

From: Křištof Želechovski <giecrilj@stegny.2a.pl>
Date: Tue, 18 Sep 2007 18:55:51 +0200
Message-ID: <000801c7fa14$c84b81b0$4d01010a@IBM42F76C011DF>
I am sorry, it is a misunderstanding.  I had the state of the radio button
when it is pressed, not the attribute name in mind.  The attribute may be
called "ratubled", "hodagred", "grabuntious" or whatever; it does not
influence the fact that a pressed radio button is not checked.
In other words, while it is possible that the value of the attribute named
"checked" of a radio button may be "true", it does not make it checked
indeed.
Cheers
Chris

-----Original Message-----
From: Simon Pieters [mailto:zcorpan@gmail.com] 
Sent: Tuesday, September 18, 2007 6:47 PM
To: K?i?tof ?elechovski; 'Jon Barnett'
Cc: whatwg at whatwg.org; 'Garrett Smith'
Subject: Re: [whatwg] successful form controls

On Tue, 18 Sep 2007 18:26:19 +0200, K?i?tof ?elechovski  
<giecrilj at stegny.2a.pl> wrote:

> What makes you think that a radio button can be checked?  My trust in  
> your
> statement will be inversely proportional to its self-confidence.  Please  
> use
> some supporting arguments instead of bold assurances.

Perhaps you could check the specs or try it in some browser? :-)

HTML4:

    http://www.w3.org/TR/html401/interact/forms.html#adef-checked

DOM2 HTML:

    http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-30233917

Try it:

 
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E
%0D%0A%3Cp%3EUnchecked%20(default)%3A%20%3Cinput%20type%3Dradio%3E%0D%0A%3Cp
%3EChecked%20with%20attribute%3A%20%3Cinput%20type%3Dradio%20checked%3E%0D%0
A%3Cp%3EChecked%20with%20script%3A%20%3Cinput%20type%3Dradio%20name%3Dfoo%3E
%0D%0A%3Cscript%3E%20foo.checked%20%3D%20true%20%3C%2Fscript%3E

-- 
Simon Pieters
Received on Tuesday, 18 September 2007 09:55:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:57 UTC