firefox and innerHTML

T

Thomas 'PointedEars' Lahn

Michael said:
Michael said:
[Multiple forms cannot have the same name attribute value.]

Yes, they certainly can.

<form action="" name="foo"><p></p></form>
<form action="" name="foo"><p></p></form>

is perfectly Valid HTML 4.01 (Strict!).

Based on what criteria? [...]

The HTML 4.01 Specification.
In the latter, yes. In the former, no. Neither Mozilla (including
recent Firefox releases), Netscape, nor Opera versions prior to 7.11
(possibly earlier, but definitely later than 7.03) return a
collection from the forms collection.

Yes, indeed. And the namedItem() method of the HTMLCollection
interface does not require them to. D'oh.
What's the getElementsByTagName method got to do with this?

Nothing, repeated typo.
As for getElementsByName, the answer there is actually quite simple:
the HTMLCollection interface is only meant to return single
Node-implementing objects via the item and namedItem methods (and the
property accessor equivalents). That browsers return a collection is
a product of DOM 0, not DOM 1 or 2. As such, the getElementsByName
method was meant to fill this void.

Of course, I'm not, nor have I been, a member of the HTML or DOM
Working Groups, so this is just my interpretation of events.

You're probably right.


PointedEars
 
M

Michael Winter

On 13/07/2005 08:36, Thomas 'PointedEars' Lahn wrote:

[Referring to getElementsByTagName, not getElementsByName]
Oh my, yes of course! :) Sorry for causing confusion.

Given the poor state of mind I was in yesterday (I've had sleep now.
Yay! :D), you certainly did confuse me. You're forgiven, though. :p

[Retaining the name attribute in XHTML]
No, in XHTML 1.0 _Strict_, the following elements do have the `name'
attribute:

meta, a, object, param, map, input, select, textarea, button.

Only four of them can be considered form elements.

Five, I believe. The OBJECT element can also participate in form
submissions, however the specification doesn't define how this
particular mechanism works which is verging on ridiculous. Still, it is
a form control and retains its name attribute for this purpose.

[snip]

Mike
 
T

Thomas 'PointedEars' Lahn

Michael said:
[Retaining the name attribute in XHTML]

No, in XHTML 1.0 _Strict_, the following elements do have the
`name' attribute:

meta, a, object, param, map, input, select, textarea, button.

Only four of them can be considered form elements.

Five, I believe. The OBJECT element can also participate in form
submissions,

Yes, indeed!
however the specification doesn't define how this particular
mechanism works [...]

<http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT>


PointedEars
 
M

Michael Winter

Michael Winter schrieb:

[Submitting an OBJECT]
however the specification doesn't define how this particular
mechanism works [...]

<http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT>

I meant regarding the value of that OBJECT element. In both 17.2 and
17.12.2, the specification says that the value "is determined by the
object's implementation".

The description in 17.2 goes on to say:

"... (i.e., it lies outside the scope of this specification)."

Mike
 
T

Thomas 'PointedEars' Lahn

Michael said:
Michael Winter schrieb:

[Submitting an OBJECT]
however the specification doesn't define how this particular
mechanism works [...]

<http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT>

I meant regarding the value of that OBJECT element. In both 17.2 and
17.12.2, the specification says that the value "is determined by the
object's implementation".

The description in 17.2 goes on to say:

"... (i.e., it lies outside the scope of this specification)."

ISTM that having the `object' element as a descendent of the `form'
element and submitting the form it creates would submit the data of
the resource that the `object' element refers to which is referred
to as the `object' element's value. That would allow for submitting
any form of information if the UA provided means to display it. Of
course the way how the UA displays it (e.g. what plugin is used and
what parameters it needs) would lie outside the scope of the HTML
4.01 Specification.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top