X
xyZed
Although related to false javascript errors during validation checks,
this is a question about html validation.
I have several affiliate links stopping my pages validating. They use
javascript which I don't understand. Apparently it's a known issue
that html validators can erroneously flag javascript errors.
I have read the information on this page
http://www.htmlhelp.com/tools/validator/problems.html#script
which offers a solution. But I do not want to accidently disable the
javascript functions of my affiliate links by adding stuff I don't
understand.
The W3C (and dreamweaver's) validators flag the following error -
< found between tags. Consider using the equivalent entity (& =
'&', < = '<', > = '>', " = quotation mark). [HTML 4.0]
And this is the script it flags up -
<script type="text/javascript">
var uri = 'http://impgb.tradedoubler.com/imp/js/16125532/1079419?' +
new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="javaScript" src="'+uri+'"
charset="ISO-8859-1"></sc'+'ript>');
</script>
I can fix this by adding a back slash here <\/sc'+'ript>' as mentioned
on
http://www.htmlhelp.com/tools/validator/problems.html#script
<quoting relevant passage>
"A common error (and the most common source of erroneous bug reports
for the WDG HTML Validator) occurs when writing HTML tags within a
SCRIPT element:
<script type="text/javascript">
<!--
// This is an error!
document.write("</P>");
// -->
</script>
(The fix is to add a backslash -)
<script type="text/javascript">
<!--
document.write("<\/P>");
// -->
</script>
</quote>
I'm hoping someone can tell me if this is a legitimate fix and that it
won't interfere with the javascript functions please
--
Free washing machine help and advice.
www.washerhelp.co.uk
www.xyzed.co.uk/newsgroups/top-posting.html
this is a question about html validation.
I have several affiliate links stopping my pages validating. They use
javascript which I don't understand. Apparently it's a known issue
that html validators can erroneously flag javascript errors.
I have read the information on this page
http://www.htmlhelp.com/tools/validator/problems.html#script
which offers a solution. But I do not want to accidently disable the
javascript functions of my affiliate links by adding stuff I don't
understand.
The W3C (and dreamweaver's) validators flag the following error -
< found between tags. Consider using the equivalent entity (& =
'&', < = '<', > = '>', " = quotation mark). [HTML 4.0]
And this is the script it flags up -
<script type="text/javascript">
var uri = 'http://impgb.tradedoubler.com/imp/js/16125532/1079419?' +
new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="javaScript" src="'+uri+'"
charset="ISO-8859-1"></sc'+'ript>');
</script>
I can fix this by adding a back slash here <\/sc'+'ript>' as mentioned
on
http://www.htmlhelp.com/tools/validator/problems.html#script
<quoting relevant passage>
"A common error (and the most common source of erroneous bug reports
for the WDG HTML Validator) occurs when writing HTML tags within a
SCRIPT element:
<script type="text/javascript">
<!--
// This is an error!
document.write("</P>");
// -->
</script>
(The fix is to add a backslash -)
<script type="text/javascript">
<!--
document.write("<\/P>");
// -->
</script>
</quote>
I'm hoping someone can tell me if this is a legitimate fix and that it
won't interfere with the javascript functions please
--
Free washing machine help and advice.
www.washerhelp.co.uk
www.xyzed.co.uk/newsgroups/top-posting.html