Connecting Tech Pros Worldwide Forums | Help | Site Map

DOM and fieldset

Fred
Guest
 
Posts: n/a
#1: Aug 24 '08
why can't a fieldset have a 'name' property as every other element can?

purcaholic
Guest
 
Posts: n/a
#2: Aug 25 '08

re: DOM and fieldset


On 24 Aug., 21:46, Fred <F...@notspam.notwrote:
Quote:
why can't a fieldset have a 'name' property as every other element can?
The name attribute is not an universal attribute, therefore you can't
use it for every element. It can be used for some elements (see
http://www.w3.org/TR/html4/index/attributes.html for details). I case
of using XHTML, some elements should use the id attribute instead of
name (see http://www.w3.org/TR/xhtml1/#h-4.10)

Regards,
purcaholic
SAM
Guest
 
Posts: n/a
#3: Aug 25 '08

re: DOM and fieldset


Fred a écrit :
Quote:
why can't a fieldset have a 'name' property as every other element can?
And why not also 'label' or 'legend' ?

I suppose only elements needed to be sent by the form can be named
(that's to say : only inputs and textareas), this names being used as
variables on server side.
form, fieldset, legend, label are of no interest on server side.


--
sm
mavigozler
Guest
 
Posts: n/a
#4: Aug 27 '08

re: DOM and fieldset


Fred <Fred@notspam.notwrote in comp.lang.javascript:
Quote:
why can't a fieldset have a 'name' property as every other element can?
What purpose do you require for wanting the attribute?

If it's only to IDentify it for manipulation by DOM methods, why isn't the
unique name of the 'id' attribute adequate?

Closed Thread