title: Javascript - include another script by using the <script> tag?
body: <p>So I have a function that writes a string into a div.
  The string is declared as <strong>content</strong>, which consists of html code, like this:</p>
  
  <pre><code>&lt;h2&gt;This is a test result&lt;/h2&gt;
  &lt;script type="text/javascript" src="example_content.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt; document.write(example_content); &lt;/script&gt;
  </code></pre>
  
  <p>where <strong>example_content.js</strong> :</p>
  
  <pre><code>example_content = '&lt;p&gt;some text some text some text some text some text&lt;/p&gt;'
  + '&lt;p&gt;some more text....&lt;/p&gt;'
  + '&lt;hr /&gt;'
  + '&lt;p&gt;End of text&lt;/p&gt;';
  </code></pre>
  
  <p>Problem is, instead of getting this in the div:</p>
  
  <pre><code>&lt;h2&gt;This is a test result&lt;/h2&gt;
  &lt;p&gt;some text some text some text some text some text&lt;/p&gt;
  &lt;p&gt;some more text....&lt;/p&gt;
  &lt;hr /&gt;
  &lt;p&gt;End of Text&lt;/p&gt;
  </code></pre>
  
  <p>I end up, literaly, with this:</p>
  
  <pre><code>&lt;h2&gt;This is a test result/h2&gt;
  &lt;script type="text/javascript" src="example_content.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt; document.write(example_content); &lt;/script&gt;
  </code></pre>
  
  <p>Is there a way to avoid writting the script tag as a string ? but as an actual script ?</p>
  
  <p>Thanks for any help in advance :)</p>