I code a webapp and now i want to open a new Window using JS and inserting some code in the new Window. This is the code I already tried, but with no success:
var win = window.open("TimeTableView.html", "_blank");
var pTag = win.document.createElement('p');
pTag.appendChild(win.document.createTextNode('test'));
win.document.body.innerHTML.appendChild(pTag);
win.focus();
But the
didn't append on the window's body. What can I do to append Tags on the new window?
Thanks for your help!