PDA

View Full Version : Validation failed


Marek
01-13-2007, 06:54 AM
Hello,

I tried to validate my site the the html validator and Iīve got only two errors left. But I donīt know what to do, because itīs the code for the navigation.
The validator find this fault

document type does not allow element "a" here.

in line five and eight.
<script type="text/javascript">
var existprev = "<IMAGE_PREVIOUS_ID>";
var existnext = "<IMAGE_NEXT_ID>";
if (existprev != "<IMAGE_ID>"){
document.write('<a href="#" id="menu_browse_prev" onclick="document.location=\'index.php?showimage=<IMAGE_PREVIOUS_ID>\';"></a>');
}
if (existnext != "<IMAGE_ID>"){
document.write('<a href="#" id="menu_browse_next" onclick="document.location=\'index.php?showimage=<IMAGE_NEXT_ID>\';"></a>');
}
</script><

Take a look yourown.
Validator-Link (http://validator.w3.org/check?uri=http%3A%2F%2Flichtlauschen.mareknierychl o.de%2F&charset=%28detect+automatically%29&doctype=Inline)

Can somebody help?

thanks
Marek

GeoS
01-13-2007, 09:17 PM
You can try this:
<script type="text/javascript">
<!--
var existprev = "<IMAGE_PREVIOUS_ID>";
var existnext = "<IMAGE_NEXT_ID>";
if (existprev != "<IMAGE_ID>"){
document.write('<a href="#" id="menu_browse_prev" onclick="document.location=\'index.php?showimage=<IMAGE_PREVIOUS_ID>\';"></a>');
}
if (existnext != "<IMAGE_ID>"){
document.write('<a href="#" id="menu_browse_next" onclick="document.location=\'index.php?showimage=<IMAGE_NEXT_ID>\';"></a>');
}
//-->
</script>

Marek
01-14-2007, 11:24 AM
This one is perfect. Thank you

Marek