Click here to get back home

Has the name attribute deprecated?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Has the name attribute deprecated? Jasbird 11-24-2006
Get Chitika Premium
Posted by Jasbird on November 24, 2006, 3:29 am
Please log in for more thread options


Has the name attribute deprecated?

I ask this because ASP.NET 2 warns me against using it, says that it has
been deprecated and doesn't use it (on the client) when creating a radio
button list.

I always thought that a HTML radio button list was made by giving all
the buttons the same name but different IDs?

What's going on here?

Posted by Steve Pugh on November 24, 2006, 4:58 am
Please log in for more thread options


Jasbird wrote:
> Has the name attribute deprecated?

The name attribute has a long and complicated history. It has existed
for various different elements in various different versions of HTML.

HTML 4.01 adds the name attribute to some elements which didn't have it
in HTML 4.0.

XHTML 1.0 deprecates the name attribute for a, applet, form, frame,
iframe, img, and map elements. But not for button, textarea, select,
input, object, param and meta elements.

XHTML 1.1 removes it entirely from a and map elements.

> I ask this because ASP.NET 2 warns me against using it, says that it has
> been deprecated and doesn't use it (on the client) when creating a radio
> button list.

What version of (X)HTML is your code trying to produce?

> I always thought that a HTML radio button list was made by giving all
> the buttons the same name but different IDs?

Nearly. Same name, different values. IDs are not required for radio
buttons.

Steve


Posted by Michael Fesser on November 24, 2006, 7:22 am
Please log in for more thread options


.oO(Steve Pugh)

>Jasbird wrote:
>
>> I always thought that a HTML radio button list was made by giving all
>> the buttons the same name but different IDs?
>
>Nearly. Same name, different values. IDs are not required for radio
>buttons.

You need them if you use label elements.

Micha

Posted by Steve Pugh on November 24, 2006, 9:51 am
Please log in for more thread options


Michael Fesser wrote:
> .oO(Steve Pugh)
>
> >Jasbird wrote:
> >
> >> I always thought that a HTML radio button list was made by giving all
> >> the buttons the same name but different IDs?
> >
> >Nearly. Same name, different values. IDs are not required for radio
> >buttons.
>
> You need them if you use label elements.

<label>Is that so? <input name="so" type="radio" value="no" /></label>

You need them if you use explicitly associated label elements (the only
sort that IE6 understands). For implicitly associated labels they are
not needed.

Steve


Posted by Michael Fesser on November 24, 2006, 10:39 am
Please log in for more thread options


.oO(Steve Pugh)

>Michael Fesser wrote:
>
>> You need them if you use label elements.
>
><label>Is that so? <input name="so" type="radio" value="no" /></label>
>
>You need them if you use explicitly associated label elements (the only
>sort that IE6 understands).

Correct, I should have mentioned that.

>For implicitly associated labels they are
>not needed.

Yep. BTW: Does IE7 support this? I can't test it.

Micha

Similar ThreadsPosted
Border Attribute Deprecated? June 15, 2005, 6:59 pm
Question on the ID attribute of a Tag September 3, 2004, 12:16 pm
there is no attribute "HEIGHT" November 10, 2004, 6:27 pm
there is no attribute "border" March 7, 2005, 4:49 pm
Name attribute question July 5, 2005, 9:36 pm
An attribute value must be quoted. July 8, 2005, 11:55 am
ALT attribute at Google January 4, 2006, 5:57 pm
USEMAP attribute for IMG May 2, 2006, 9:45 pm
ID attribute in XHTML 1.1 May 18, 2006, 7:24 am
div align attribute September 4, 2007, 6:20 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap