Forum Moderators: open
<script type="text/javascript" src="http://www.example.com/server/adx.js"></script>
<script type="text/javascript">
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.example.com/server/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:8");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href="http://www.example.com/server/adclick.php?n=ab108006"><img src="http://www.example.com/server/adview.php?what=zone:8&n=ab108006" alt="" /></a></noscript>
Here is the W3 error report...
# Error Line 50 column 86: document type does not allow element "a" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "pre", "address", "fieldset" start-tag.
...sh.com/server/adclick.php?n=ab108006"><img src="http://www.example.com/s
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
✉
# Error Line 50 column 194: end tag for "noscript" which is not finished.
...p;n=ab108006" alt="" /></a></noscript>
Most likely, You nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>
Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, <head> generally requires a <title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
Please help me... I just can't see where I'm going wrong :(
[edited by: encyclo at 1:35 am (utc) on May 31, 2007]
[edit reason] fixed BBcode [/edit]
noscript is handled is different between the two. The above markup is valid HTML 4.01 Transitional. To make it valid HTML 4.01 Strict you much place the content within the
noscript section within an explicit block-level element. For example: <noscript>[b]<p>[/b]<a href="http://www.example.com/server/adclick.php?n=ab108006"><img src="http://www.example.com/server/adview.php?what=zone:8&n=ab108006" alt="" /></a>[b]</p>[/b]</noscript> [edited by: encyclo at 1:36 am (utc) on May 31, 2007]