JavaScript validation issues

Hi all -

I've been wrestling with a JavaScript error from the validator for a few 
days for the following code. I've tried escaping the JavaScript with 
backslashes and commenting but that still doesn't stop the validator from 
assuming it's HTML:

<script type="text/javascript">

             var wtl_loc = 
document.URL.indexOf('https:')==0?'https://a248.e.akamai.net/v/248/2120/1d/download.akamai.com/crs/lgsitewise.js':'http://crs.akamai.com/crs/lgsitewise.js';

             document.write("<SCR" + "IPT Language = 'JavaScript' SRC = '" 
+ wtl_loc + "'></SCR" + "IPT>");


</script>

Validator sez:


Line 23, column 32: an attribute specification must start with a name or 
name token

document.write("<SCR" + "IPT SRC = '" + wtl_

Check for stray quotes or incomplete attribute definitions.



Line 23, column 32: element "SCR" undefined

document.write("<SCR" + "IPT Language = 'JavaScript' SRC = '" + wtl_

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), or by using vendor proprietary extensions such as 
"<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve 
the desired effect instead).



Line 23, column 94: delimiter """ invalid: only S separators and TAGC 
allowed here

...Script' SRC = '" + wtl_loc + "'></SCR" + "IPT>");


Thanks in advance for any suggestions. I'm wondering if I've just been 
staring at the code for too long.

--
B.K. DeLong
bkdelong@pobox.com
+1.617.797.2472

http://bkdelong.mit.edu                       Work.
http://www.brain-stream.com               Play.
http://www.the-leaky-cauldron.org        Potter.
http://www.city-of-doors.com               Sigil.
http://www.hackerfoundation.org          Future.
http://www.osvdb.org/                         Security.
http://www.wkdelong.org           Son.


PGP Fingerprint:
38D4 D4D4 5819 8667 DFD5  A62D AF61 15FF 297D 67FE

FOAF:
http://foaf.brain-stream.org 

Received on Thursday, 9 December 2004 15:06:22 UTC