title: Add external JS script through code
body: <p>I'm trying to implement a map widget from 'Awesome Table' in the source code of an open-source CRM.</p>
  
  <p>The piece of code I have to add is</p>
  
  <pre><code> &lt;div data-type="AwesomeTableView" data-viewID="-KLtnY5OHJPgnEOX1bKf"&gt;&lt;/div&gt;
   &lt;script type="text/javascript" src="https://awesome-table.com/AwesomeTableInclude.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I try to do it with jQuery like this :</p>
  
  <pre><code>$(document).ready(function () {
      var div = "&lt;div data-type=\"AwesomeTableView\" data-viewID=\"-KLtnY5OHJPgnEOX1bKf\"&gt;&lt;/div&gt;";
      var scr = "&lt;script type=\"text/javascript\" src=\"https://awesome-table.com/AwesomeTableInclude.js\"&gt;&lt;/script&gt;";
      $("body").append(div, scr);
  });
  </code></pre>
  
  <p>But I got a problem : in the console the src appears like this:</p>
  
  <blockquote>
    <p><a href="http://127.0.0.1/edsa-EspoCRM-4.1.6/api/v1/https://awesome-table.com/AwesomeTableInclude.js" rel="nofollow">http://127.0.0.1/edsa-EspoCRM-4.1.6/api/v1/https://awesome-table.com/AwesomeTableInclude.js</a></p>
  </blockquote>
  
  <p>See what's wrong...</p>
  
  <p>Before I tried with javascript but I had an almost identical result (nothing appeared and the script didn't worked)</p>
  
  <pre><code>var div = document.createElement("div");
  div.id = "lacarte";
  div.dataset.type = "AwesomeTableView";
  div.dataset.viewid = "-KLtnY5OHJPgnEOX1bKf";
  div.style.height = "200px";
  
  var scr = document.createElement("script");
  scr.type = "text/javascript";
  scr.src = "https://awesome-table.com/AwesomeTableInclude.js";
  var page = document.getElementById("content");
  page.appendChild(div);
  page.appendChild(scr);
  </code></pre>
  
  <p>If you have any idea?</p>