I\'m not sure what is wrong with my code, but when I try and add actorWin.document.write(\'
but when I try and add actorWin.document.write('') everything gets screwed up
Not sure what's the problem but it may help you
Writing to a document that has already loaded without calling document.open() will automatically perform a document.open call.
About document.open call
If a document exists in the target, this method clears it.
Read more on MDN.
var newWin = window.open('','Win','width=300,height=200,top=100,left=600');
// Then add scripts
var script1 = document.createElement('script');
script1.innerHTML = "function someFunc(){ alert('Hello'); }";
newWin.document.getElementsByTagName('head')[0].appendChild(script1);
var script2 = document.createElement('script');
script2.src = "http://code.jquery.com/jquery-git2.js";
newWin.document.getElementsByTagName('head')[0].appendChild(script2);
This should work. An Example here.