It just stands to reason that if you have something like this:
Code:
<script type="text/javascript">
document.write('<script src="generic_drag.js" type="text/javascript"></script>')
</script>
The script parser will think that the script is over when it hits the first </script>, making the document.write statement invalid, due to an unterminated string variable or literal (depending on the parser). If instead you break it up, like:
Code:
<script type="text/javascript">
document.write('<script src="generic_drag.js" type="text/javascript"><' + '/' + 'script>')
</script>
Then the script will only see the last </script> as the end of the script.
Bookmarks