This is what I am trying to do:

<script type="text/javascript">
	document.write("<script type='text/javascript' src='" + id + ".js'></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:

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