Bonjour,
J'ai un prob de validation en XHTML 1.0 transitionnal à cause d'un script JavaScript. Voici donc la portion qui recoit des erreurs :
Et voici les 4 erreurs que me met le validateur W3C :
Pourriez vous m'aider , merci
Modifié par J3R3My (09 Apr 2005 - 09:40)
J'ai un prob de validation en XHTML 1.0 transitionnal à cause d'un script JavaScript. Voici donc la portion qui recoit des erreurs :
function ejs_aff_photos(num)
{
if(document.getElementById)
{
ejs_fin = "";
if(num!=0)
ejs_fin += "<a href='#' onclick='ejs_aff_photos("+(num-1)+");return(false)'> < Précédent </a>";
if(num!=(ejs_photo.length-1))
ejs_fin += "<a href='#' onclick='ejs_aff_photos("+(num+1)+");return(false)'> Suivant > </a>";
document.getElementById("ejs_photo_box").innerHTML = "<img src='"+ejs_photo[num]+"' alt='Photo' title='Photo' /> <br /> "+ejs_fin+"";
}
}
window.onload = new Function("ejs_aff_photos(0)")
Et voici les 4 erreurs que me met le validateur W3C :
[#red]1[/#]Line 306, column 78: document type does not allow element "a" here
..._aff_photos("+(num-1)+");return(false)'> < Précédent </a>";
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).
[#red]2[/#]Line 308, column 78: document type does not allow element "a" here
..._aff_photos("+(num+1)+");return(false)'> Suivant > </a>";
[#red]3[/#]Line 309, column 113: document type does not allow element "img" here
...o[num]+"' alt='Photo' title='Photo' /> <br /> "+ejs_fin+"";
[#red]4[/#]Line 309, column 120: document type does not allow element "br" here
..."' alt='Photo' title='Photo' /> <br /> "+ejs_fin+"";
Pourriez vous m'aider , merci
Modifié par J3R3My (09 Apr 2005 - 09:40)