Partage
  • Partager sur Facebook
  • Partager sur Twitter

Erreur W3C

Aidez moi a corriger

Sujet résolu
    22 février 2006 à 19:07:17

    bonjour.

    a l'aide du validateur W3c j'ai trouver 2 erreurs que je n'arrive pas a résoudre :
    Error Line 150, column 51: there is no attribute "name" .
    <form method="post" action="connection.php" name="formulaire">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.

    &#9993;

    Error Line 161, column 9: element "SCRIPT" undefined .
    <SCRIPT>document.formulaire.pseudo.focus();</SCRIPT> You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case.


    Pour le code suivant :
    <form method="post" action="connection.php" name="formulaire">
    <div><label for="pseudo">Pseudo : </label><input type="text" maxlength="20" name="pseudo" id="pseudo"/>
    <br/></div>

    <div><label for="password">Password : </label><input type="password" name="password" id="password"/>
    <br/></div>

    <div><label for="remember">Se souvenir de moi ? </label><input type="checkbox" name="remember" id="remember"/>
    <br/><br/></div>
    <div><input type="submit" value="Connection"/></div>
    </form>
    <SCRIPT>document.formulaire.pseudo.focus();</SCRIPT>


    Les erreurs, je sais où elles sont mais je ne comprend pas pourquoi il me dit ces erreurs.

    Quelqu'un peut m'aider ???


    Après recherche sur le net, je m'en remet a vous.

    Merci d'avance.
    • Partager sur Facebook
    • Partager sur Twitter
      22 février 2006 à 19:26:51

      Salut,

      - Error Line 150, column 51: there is no attribute "name"

      Name, n'est pas valide pour nommer un formulaire, il faut le remplacer par ID.

      - Error Line 161, column 9: element "SCRIPT" undefined

      <script type="text/javascript"></script>
      • Partager sur Facebook
      • Partager sur Twitter
        22 février 2006 à 19:43:52

        Merci bien cher amis. je n'avais meme pas pensé a la balise <script> pourtant je le savais ... boulet ;)
        • Partager sur Facebook
        • Partager sur Twitter
          22 février 2006 à 20:46:30

          Citation : strucky

          <script type="text/javascript"></script>


          je dirais même plus ! :D :

          <script language="JavaScript" type="text/javascript">
          // Ton code par là
          </script>


          ++ :)
          • Partager sur Facebook
          • Partager sur Twitter

          Erreur W3C

          × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
          × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
          • Editeur
          • Markdown