On 24 Nov 2006 01:58:55 -0800, "Steve Pugh" <st**********@gmail.com>
wrote:
>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?
XHTML 1.0 Transitonal
>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.
Unfortunately, ASP.NET is not giving the radio buttons any name at all,
but actually allocated the name (I gave the servers-side controls) to a
table (on the client), then gives the client-side radio buttons IDs of:
rad1_0, rad1_1, etc. (when the server-side name is rad1)
I can give the radio button list a event (programmed on the server) -
and ASP.NET then allocates that event to the bloody table - not the
actual buttons (which it places in the table).
Nevertheless, once I figured out what was going on I was able to do my
javascript validation so it's no longer a problem - just a puzzle.
I may try changing the default page spec to validate for HTML 4 in
future, as this attribute-cide I get from constant compiler warnings is
annoying me. As if anyone expects browsers to actually deprecate these
attributes - I bet they'll still be there in 50 years time.
Steve