Re: ID vs NAME in different browsers
| From: | David Hall | Date: | Sat, 28 Jan 2006 17:20:41 +0000 |
| Subject: | Re: ID vs NAME in different browsers | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229405@lists.php.net to get a copy of this message | ||
Niels wrote:
name = cdata [CI] This attribute names the element so that it may be referred to from style sheets or scripts. Note. This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements.Uh, sorry to disappoint, but that's a description of the form element, not of the input element or select input. In fact, if you go to http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.4.2 , you will see that the example form quite clearly uses name. And for the input element, http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.4.2 says that name assigns the control name. The attributes for the form element are completely independent of the input elements. (Note, for things like radio buttons, using id makes no sense. You must have multiple elements with the same name. If you used id for these multiple elements, you would be breaking the rules of html saying only one element can have a certain id . . .) David Hall