Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
688 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  XHTML validator

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

XHTML validator

n°1952190
masseur
Posté le 21-12-2009 à 19:33:53  profilanswer
 

Bonsoir.
 
Dans le head de mon site je fais ceci.
 

Code :
  1. var loader = jQuery('<div id="loader"><img src="images/loading.gif" alt="loading..." /></div>')


 
Quand je passe ma passe au validateur j'ai une erreur la dessus.
 
Si vous avez des idées pour contourner cela.
 
Merci
 

Citation :

Line 79, Column 40: document type does not allow element "div" here
 
  var loader = jQuery('<div id="loader"><img src="images/loading.gif" alt="loadi
 

 
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
 
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

mood
Publicité
Posté le 21-12-2009 à 19:33:53  profilanswer
 

n°1952191
stealth35
Posté le 21-12-2009 à 19:36:17  profilanswer
 

normale faut mettre des balise CDATA  
 

Code :
  1. <script type="text/javascript">
  2. //<![CDATA[
  3. var loader = jQuery('<div id="loader"><img src="images/loading.gif" alt="loading..." /></div>');
  4. //]]>
  5. </script>

n°1952200
masseur
Posté le 21-12-2009 à 19:49:27  profilanswer
 

Merci bien :)


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  XHTML validator

 

Sujets relatifs
Cherche intégrateur xhtml/cssstruts validator : valeur d'un champ dans le message d'erreur
Convertir du latex en XHTMLValidation XHTML W3C
Introduire des liens textes dans une image (XHTML)XHTML strict, target frame!! -> javaScript ?
XHTML -> XSL -> XML, même le plus simple ne fonctionne pas !XHTML validator et inclusions de <a>
XHTML 1.0 sctrict: erreur sur le validator 
Plus de sujets relatifs à : XHTML validator


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR