What I want to do is a document.write () in the main window, and another in the secondary window that opens. I know it will be silly but I've been a while now and I'm not capable.
What I am doing is something like that, but it is clear that it does not work:
<doctype HTML>
<html>
<head>
<meta charset='utf-8'>
<title></title>
<style>
</style>
<script type="text/javascript">
var subventana=window.open("index.html", "", "height=600, width=800");
//sub_ventana.moveTo(0,0);
subventana.resizeTo(800,600);
document.write("<h1>Hola1</h1><br />");
function realizar(){
subventana.document.write("<h3>Hola2</h3><br />");
}
realizar();
</script>
</head>
<body>
</body>
</html>