Re: [PHP] ID vs NAME in different browsers
On Saturday 28 January 2006 18:20, David Hall wrote: > Uh, sorry to disappoint, but that's a description of the form element, > not of the input element or select input. Right. > 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. > Right. > The attributes for the form element are completely independent of the > input elements. Right. > (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 . . .) Excellent example! I think you've answered my question: I'll have to keep using both NAME and ID. Thanks a lot! Niels -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID vs NAME in different browsers
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID vs NAME in different browsers
On Saturday 28 January 2006 16:47, Jason Petersen wrote: > HTML Forms should always use the NAME attribute to pass values, never ID. > You can use print_r($_REQUEST); at the top of your script to debug. > Thank you for your answer. W3C says: [http://www.w3.org/TR/html4/interact/forms.html] 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. So my question remains: How well do browsers support using only id? //Niels -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ID vs NAME in different browsers
On 1/28/06, Niels <[EMAIL PROTECTED]> wrote: when making an input field for submission from a form, I need to put a > name='something' in it. For CSS I often use an id='something'. Some > browsers apparently submit the field properly if name is missing and id is > present. Others might not. Can anyone tell me about what browsers do what? HTML Forms should always use the NAME attribute to pass values, never ID. You can use print_r($_REQUEST); at the top of your script to debug. Jason