finding wrong characters in javascript
<p>Since I am about to write a small php-script I like to call to get all the javascript for my page, this leads to strange error on client side. The script does actually use an configuration xml-file and some xsl-stylesheets to generate an large Javascript string. Sometimes it happens that I get an 'unterminated String literal' error, sometimes an error rises that says: 'An attempt was made to use an object that is not, or is no longer, usable', just after the javascript executes an document.write operation.
Are there any resources, or is there any tutorial, just something that reveals about the traps of running into such problems when copying a bunch of javscript files into one String or file?</p>

<p>greetings philipp</p>

<p>EDIT::
the following error:</p>

<p><img src="http://i.stack.imgur.com/hqwM0.png" alt="the error message"></p>

<p>is thrown in an webpage that is delivered with content-type: 'application/xhtml+xml'. The actual generated Javascript looks like this:</p>

<p><a href="http://pastebin.com/8V302mz9" rel="nofollow">source code generated</a></p>

<p>The script itself runs until the first document.write command is triggered.</p>
