469,271 Members | 1,627 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

DOM and fieldset

why can't a fieldset have a 'name' property as every other element can?
Aug 24 '08 #1
3 2387
On 24 Aug., 21:46, Fred <F...@notspam.notwrote:
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
Aug 24 '08 #2
SAM
Fred a écrit :
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
Aug 25 '08 #3
Fred <Fr**@notspam.notwrote in comp.lang.javascript:
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?

Aug 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Ian Rastall | last post: by
3 posts views Thread by Trent | last post: by
2 posts views Thread by luke | last post: by
4 posts views Thread by Adam Smith | last post: by
kestrel
6 posts views Thread by kestrel | last post: by
1 post views Thread by Nate12o6 | last post: by
3 posts views Thread by shapper | last post: by
1 post views Thread by BlueG | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.