Re: bad first example on FORM page

On 25 Jan 2012, at 2:23 AM, Tom McDougal wrote:

> On this page describing Forms --
> 
> http://www.w3.org/TR/html4/interact/forms.html#submit-format
> 
> -- the first simple example contains an error which caused me much grief. The two "INPUT" elements include "id" attributes. This is a mistake; "id" is not a normal attribute for INPUT elements; instead they should be "name". Here is the exact text (with my comments on the offending lines):
> 
> <FORM action="http://somesite.com/prog/adduser" method="post">
>   <P>
>   <LABEL for="firstname">First name: </LABEL>
>             <INPUT type="text" id="firstname"><BR>   // should be: name="firstname"
>   <LABEL for="lastname">Last name: </LABEL>
>             <INPUT type="text" id="lastname"><BR>    // should be: name="lastname"
>   <LABEL for="email">email: </LABEL>
>             <INPUT type="text" id="email"><BR>
>   <INPUT type="radio" name="sex" value="Male"> Male<BR>
>   <INPUT type="radio" name="sex" value="Female"> Female<BR>
>   <INPUT type="submit" value="Send"> <INPUT type="reset">
>   </P>
> </FORM>
> 
> 
> The example under section 17.4.2 correctly uses NAME attributes.

Hi Tom,

Thank you for the note. I don't know whether the HTML Working Group is maintaining errata for HTML4 actively these days given their focus on HTML5.

Ian

> 
> Tom
> 
> 
> 
> 
> 
> 

--
Ian Jacobs (ij@w3.org)    http://www.w3.org/People/Jacobs/
Tel:                                      +1 718 260 9447

Received on Wednesday, 25 January 2012 13:26:20 UTC