Kalle_Worms: VALIDATOR: Tabelle darf keine Höhe haben, Formular keinen Namen

Hallöle,

meine Seite beginnt mit
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
<html>

Beim Validator-Lauf wunderte ich mich über die Meldungen:

1. Line 51, column 27: there is no attribute "HEIGHT"

<table width='100%' height='100%'><tr><td>
                           ^
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

2. Line 72, column 11: there is no attribute "NAME"

<form name='form_besucher' action='/owner_11/index.php' method='post'><input typ
           ^

Habe ich auch noch nicht gewusst.

LG Kalle

  1. Hallo,

    <table width='100%' height='100%'><tr><td>

    Warum verwendest du nicht CSS anstatt diesem Uralt-HTML. Mit CSS gibt es bei Tabellenhöhen keine Probleme.

    <form name='form_besucher' action='/owner_11/index.php' method='post'><input typ
               ^

    Nimm statt name id.

    Markus.

    --
    sh:( fo:| ch:? rl:( br:> n4:( ie:{ mo:) va:) de:] zu:) fl:( ss:| ls:] js:|
    1. Hallo,

      <form name='form_besucher' action='/owner_11/index.php' method='post'><input typ
      Nimm statt name id.

      Warum?

      Ein Formular benötigt normalerweise kein name- bzw id-Attribut, höchstens für JavaScript. Willst Du es dort dann per document.getElementById() referenzieren? Das ist _viel_ langsamer und speicherfressender als document.forms["Formularname"].

      viele Grüße

      Axel

      1. Hi,

        Ein Formular benötigt normalerweise kein name- bzw id-Attribut, höchstens für JavaScript.

        Ich glaubte auch, dass er mit Javascript etwas vor hat.

        Willst Du es dort dann per document.getElementById() referenzieren? Das ist _viel_ langsamer und speicherfressender als document.forms["Formularname"].

        Das wusste ich nicht.

        Markus.

        --
        sh:( fo:| ch:? rl:( br:> n4:( ie:{ mo:) va:) de:] zu:) fl:( ss:| ls:] js:|
        1. document.forms["Formularname"].

          Habe in Selfhtml danach geblättert, und muss feststellen, dass diese Notation in XHTML doch gar nicht mehr verwendet werden kann, da es nur auf mit name= referenzierte Formulare zugreifen kann, die es aber in XHTML nicht mehr gibt.
          Wahrscheinlich ist forms[0] die einzige Möglichkeit es auf deine Weise zu lösen.

          Markus.

          --
          sh:( fo:| ch:? rl:( br:> n4:( ie:{ mo:) va:) de:] zu:) fl:( ss:| ls:] js:|
          1. Hallo,

            document.forms["Formularname"].
            Habe in Selfhtml danach geblättert, und muss feststellen, dass diese Notation in XHTML doch gar nicht mehr verwendet werden kann,

            Ja, hier war aber _nicht_ von XHTML die Rede.

            XHTML hat noch einige andere Probleme in der praktischen Anwendung. Es ist deshalb auch nicht zu empfehlen jetzt auf Biegen und Brechen XHTML einsetzen zu wollen, wenn man _nur_ HTML für Browser schreiben will. Dafür ist HTML4.01 bestens geeignet.

            viele Grüße

            Axel

          2. Habe in Selfhtml danach geblättert, und muss feststellen, dass diese Notation in XHTML doch gar nicht mehr verwendet werden kann, da es nur auf mit name= referenzierte Formulare zugreifen kann, die es aber in XHTML nicht mehr gibt.

            SELFHTML ist in diesem Punkt nicht auf dem neuesten Stand. DOM HTML definiert document.forms als Collection. Die Elemente dieser Collection werden über ihr name- oder ihr id-Attribut angesprochen. Neuere Browser verstehen das, ältere wie etwa Netscape 4 führen in document.forms nur Formulare mit name-Attributen.

            Mathias

          3. Hallo du da draußen,

            document.forms["Formularname"].
            Habe in Selfhtml danach geblättert, und muss feststellen, dass diese Notation in XHTML doch gar nicht mehr verwendet werden kann

            Was hat JavaScript mit XHTML zu tun?

            da es nur auf mit name= referenzierte Formulare zugreifen kann, die es aber in XHTML nicht mehr gibt.

            Quatsch.

            Grüße von hier drinnen, aus Biberach an der Riss,
            Candid Dauth (Dogfish)

            --
            »Bismarck biss Mark, bis Mark Bismarck biss!«
            http://cdauth.net.tc/
            ie:{ fl:( br: va:} ls:[ fo:| rl:( n4:( ss:) de:> js:( ch:| sh:( mo:) zu:|
          4. Hi,

            da es nur auf mit name= referenzierte Formulare zugreifen kann, die es aber in XHTML nicht mehr gibt.

            Das stimmt nicht. XHTML 1.0 transitional erlaubt sehr wohl das name-Attribut für form.

            cu,
            Andreas

            --
            Warum nennt sich Andreas hier MudGuard?
            Schreinerei Waechter
            Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
            1. Hallo,

              da es nur auf mit name= referenzierte Formulare zugreifen kann, die es aber in XHTML nicht mehr gibt.
              Das stimmt nicht. XHTML 1.0 transitional erlaubt sehr wohl das name-Attribut für form.

              Ergänzung:
              Ich hatte Unrecht. Für JavaScript ist das name Attribut nicht notwendig. Die document.forms Collection hat, so wie alle HTMLCollections http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-75708506, eine Methode namedItem(), welche hauptsächlich ID Attribute auswertet. Damit sollte

              document.forms["FormId"].elements["ElementId"]

              sicher funktionieren.

              viele Grüße

              Axel

    2. Hi,

      <table width='100%' height='100%'><tr><td>
      Warum verwendest du nicht CSS anstatt diesem Uralt-HTML.

      Gibt es eine HTML-Version, in der table ein height-Attribut hat?
      In HTML 2.0 gibt es gar kein table-Element, in 3.2 gibt es erstmalig table, aber kein height-Attribut ...

      <form name='form_besucher' action='/owner_11/index.php' method='post'><input typ

      Sinnvoller wäre, HTML 4.01 statt 4.0 zu benutzen.

      cu,
      Andreas

      --
      Warum nennt sich Andreas hier MudGuard?
      Schreinerei Waechter
      Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
  2. Hallo,

    meine Seite beginnt mit
    Beim Validator-Lauf wunderte ich mich über die Meldungen:

    1. Line 51, column 27: there is no attribute "HEIGHT"
      <table width='100%' height='100%'><tr><td>

    Das ist richtig. Nutze CSS.

    1. Line 72, column 11: there is no attribute "NAME"
      <form name='form_besucher' action='/owner_11/index.php' method='post'><input typ

    Welcher Validator ist das?
    Das FORM-Element hat natürlich ein name-Attribut.

    viele Grüße

    Axel

    1. Das FORM-Element hat natürlich ein name-Attribut.

      nicht in XHTML-1.0-Strict

      1. Hallo dedlfix,

        Das FORM-Element hat natürlich ein name-Attribut.

        nicht in XHTML-1.0-Strict

        Schau dir nochmals die 4. Zeile des Originalposts an ;-)

        Gruss aus Luzern,
        Daniel

      2. Hallo,

        Das FORM-Element hat natürlich ein name-Attribut.
        nicht in XHTML-1.0-Strict

        Ach? Dann stimmt aber der DOCTYPE in https://forum.selfhtml.org/?t=101106&m=620304 nicht.

        viele Grüße

        Axel

        1. Das FORM-Element hat natürlich ein name-Attribut.
          nicht in XHTML-1.0-Strict
          Ach? Dann stimmt aber der DOCTYPE in https://forum.selfhtml.org/?t=101106&m=620304 nicht.

          Den DOCTYPE kann man ja beim Validator vom W3C händisch überschreiben...

    2. Hi,

      1. Line 72, column 11: there is no attribute "NAME"
        <form name='form_besucher' action='/owner_11/index.php' method='post'><input typ
        Welcher Validator ist das?
        Das FORM-Element hat natürlich ein name-Attribut.

      Nicht in der von Kalle - aus welchen Gründen auch immer - verwendeten Version HTML 4.0.

      In HTML 4.01 hat form natürlich ein name-Attribut.

      cu,
      Andreas

      --
      Warum nennt sich Andreas hier MudGuard?
      Schreinerei Waechter
      Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
      1. Hallo,

        Das FORM-Element hat natürlich ein name-Attribut.

        Nicht in der von Kalle - aus welchen Gründen auch immer - verwendeten Version HTML 4.0.

        Aarrg!
        Danke für den Hinweis.

        @Kalle

        <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
        vs.
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/html4/loose.dtd">

        nimm letzteren Doctype.

        viele Grüße

        Axel