I'm encountering an issue while trying to write to a document:
NewWindow.document.write("Hi, this is test");
NewWindow = window.open("pages/Example.html","_self");
However, the page appears blank. If I use
NewWindow.document.write("Hi, this is test");
NewWindow = window.open("pages/Example.html","displayWindow");
It works but my intention is to rewrite the content of the current page.
var NewWindow = window.open("pages/Example.html","_self");
NewWindow.document.write("Hi, this is test");
I am aiming to create a window object, write to it, and then display it.