I can open a new tab with content using window.open() like this:
But how can I load a javascript file (script tag with src attribute) in the new tab? I want the resulting html of the tab to look like this:
<html>
    <head></head>
    <body>
      <script src="http://www.example.com/example.js"></script>
      <p>Your content here</p>
    </body>
</html>
To add the code directly into the "toNewWindow" div tag does not work because it of course immediately loads the js file in the original tab..
Thanks!
