Robert: neuer Beitrag "Tipps&Tricks": DHTML/Fullrowselect

Beitrag lesen

Hi

Dürfen überhaupt zwei label-Elemente für ein Eingabefeld existieren...?

Also IMHO ist alles korrekt, aber bitte - es ist spät.

"Each LABEL element is associated with exactly one form control."
http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL

Ob das jetzt heißt, dass jedes label-Element mehrere for-Attribute haben kann (wäre durchaus möglich oder label="id1 id2 id3" ;)) oder tatsächlich mehrere label-Elemente mit gleichem for-Attributwert erlaubt sind, kapiere ich nicht komplett...

Das heißt: jedes einzelne Label kann nur zu einem einzigen Form-Element gehören (logisch, wenn ich auf das Label klicke, darf nur 1 Element darauf reagieren).

Mehrere Attribute gleichen Namens in einem Element sind überhaupt nicht erlaubt, also auch nicht für das for-Attribut beim label-Element.

Für das for-Element ist IDREF als Typ festgelegt. Im Gegensatz zu IDREFS ist bei IDREF nur eine einzige id erlaubt.

Insbesondere heißt es sogar (<>) - beachte den hier mit Sternchen markierten Satz:
The for attribute associates a label with another control explicitly: the value of the for attribute must be the same as the value of the id attribute of the associated control element. *******More than one LABEL may be associated with the same control by creating multiple references via the for attribute. *******

Womit das also explizit erlaubt ist.

Unter "Beachten Sie" fehlt, dass das label-Element nicht nur nicht im NS4 funktioniert, sondern ihn auch umgehen zum Crash veranlasst... insofern ist dann nichts mehr "voll funktionsfähig". ;)

Weder mein Netscape 4.71 noch mein 4.76 noch mein 4.78 stürzen bei Verwendung von Label ab. Sie beachten es einfach nicht, geben nur den Inhalt aus.

Robert