Forum Moderators: open
Is it normal for JavaScript to cause the Validator to fail?
Here it is, nice and simple, I tried a few things, like different quotes, no avail:
<script type="text/javascript">
var strOutput='<a href="http://www.msn.com">MSN</a>';
document.write(strOutput);
</script>
<noscript>
<a href="http://www.msn.com">MSN</a>
</noscript>
I'm kinda anal about my pages validating so what should I do?
Take care,
Cyrus
I have the <noscript> tag in the body (in a <div> as well) and that wasn't it.
I did get it to validate but I still get a warning. Here is what I had to do:
var strOutput="<\a href="...">Link<\/a>";
document.write(strOutput);
Notice the gay backslashes I had to use before the 'a' and the closing 'a'?
Do you think that can mess anything up when it's written? It works in IE6 and Firefox.
Take care,
Emperor
I don't think it should be required before the a, though.