Re: Finding a Form Element from an Input



Jim Land said the following on 8/1/2006 6:15 PM:
"Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx> wrote in news:1154452634.071759.301510@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

Jim Land (NO SPAM) wrote:
Lasse Reichstein Nielsen <lrn@xxxxxxxxxx> wrote in
news:4pwyx2s5.fsf@xxxxxxxxxx:

the "name" and "id" attributes of a "form" element must be
identical in valid HTML.

No they don't.

7.5.2
The id attribute shares the same name space as the name attribute
_when
used for anchor names_.

http://www.w3.org/TR/html4/struct/global.html#adef-id
What about:-

<quote = cite="http://www.w3.org/TR/html4/struct/links.html#h-12.2.3";>
It is permissible to use both attributes to specify an element's unique
identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME,
IMG, and MAP. When both attributes are used on a single element, their
values must be identical.
<quote>

- which explicitly stats that it is permissible to use both a NAME and
an ID on FORM elements, but that both must have the same value.

Well, yes, but your quotation appears as a note in the section on A tags.


But it clearly says it applies to A, APPLET, FORM, FRAME, IFRAME, IMG and MAP elements.

If this were really true, one would expect to find the details by examining each of the tags named.

Are you kidding? Duplicate it all over the place?

But in fact there is no such prohibition in the sections which define APPLET, FORM, FRAME, IFRAME, IMG, or MAP tags.

In fact, trying to validate a form element with a NAME attribute under HTML4.01 Strict gets an error from the validator:

Error Line 12 column 11: there is no attribute "NAME".
<form name="myForm" id="myID" action="somewhere">

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • Re: Finding a Form Element from an Input
    ... identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME, ... Well, yes, but your quotation appears as a note in the section on A tags. ... IMG, or MAP tags. ...
    (comp.lang.javascript)
  • Re: Finding a Form Element from an Input
    ... The section notes that both attributes share the same namespace; two different elements cannot use either attribute to declare a duplicate identifier. ... APPLET, FORM, FRAME, IFRAME, IMG, or MAP tags. ...
    (comp.lang.javascript)
  • Re: How Do I Re-Rip My Library Without Losing My Tags?
    ... If you change the track name in WMP, the file is not, by default, ... could, after ripping again, edit the file names of the ID3 tag backups ... unique identifier based on the Microsoft/AMG database. ... will be different since they are based on tags. ...
    (microsoft.public.windowsmedia.player)
  • Re: How Do I Re-Rip My Library Without Losing My Tags?
    ... I decided to let Windows Media Player to rename ... could, after ripping again, edit the file names of the ID3 tag backups ... unique identifier based on the Microsoft/AMG database. ... will be different since they are based on tags. ...
    (microsoft.public.windowsmedia.player)
  • Re: Generating GUID tags with php
    ... Identifier) tags with php? ... unique identifier) then check out this PECL module: ... I can simply use the URL of each picture as string input to the md5 ...
    (comp.lang.php)