This is what I am trying to do:

Code:
<script type="text/javascript">
	document.write("<script type='text/javascript' src='" + id + ".js'></script>");
</script>
And i get the error: unterminated string constant.

I have a .js file with some document.write statements, and i'd like to show the contents of this file but calling it with a variable.

I've used something similar earlier in the page with no issues:

Code:
document.write('<link rel="stylesheet" href="style/' + brand + '.css" media="screen" />');
So not sure why this is not working?