Forum Moderators: open
Here is the code with the problem:
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></scr'+'ipt>');
Here are the errors I'm getting:
Line 214, Column 23: an attribute specification must start with a name or name token.
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.c✉
An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).
Line 214, Column 23: element "scr" undefined.
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.c✉
You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
Line 214, Column 211: delimiter "'" invalid: only S separators and TAGC allowed here.
…+'&target='+wx_targetDiv+'"></scr'+'ipt>'); ✉
Line 214, Column 23: XML Parsing Error: error parsing attribute name.
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.c✉
Line 214, Column 23: XML Parsing Error: attributes construct error.
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.c✉
Line 214, Column 23: XML Parsing Error: Couldn't find end of Start Tag scr line 214.
document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.c✉
Line 214, Column > 80: XML Parsing Error: expected '>'.
…nt.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?confi…✉
Line 214, Column > 80: XML Parsing Error: Opening and ending tag mismatch: script line 196 and scr.
…nt.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?confi…✉
Line 215, Column 9: XML Parsing Error: Opening and ending tag mismatch: div line 184 and script.
</script>✉
Line 248, Column 6: XML Parsing Error: Opening and ending tag mismatch: body line 15 and div.
</div>✉
Line 249, Column 7: XML Parsing Error: Opening and ending tag mismatch: html line 2 and body.
</body>✉
I would really be greatful for any help.
Presumably you have that code inside another javascript tag? If you do, simply add the CDATA tags that will tell the validator to ignore everything inside:
<script type="text/javascript">
/* <![CDATA[ */
document.write('<scr'+'ipt src="'...'");
/* ]]> */
</script>