<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>Ventana 1</h1>
<p>Esta es la primera ventana.</p>
<button onclick="openWindow2()">Abrir Ventana 2</button>
<script>
function openWindow2() {
google.script.run.withSuccessHandler(function(htmlContent) {
var newWindow = window.open("", "_blank", "width=400,height=300");
newWindow.document.open();
newWindow.document.write(htmlContent);
newWindow.document.close();
}).openWindow2();
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>Ventana 2</h1>
<p>Esta es la segunda ventana.</p>
<button onclick="openWindow3()">Abrir Ventana 3</button>
<script>
function openWindow3() {
google.script.run.withSuccessHandler(function(htmlContent) {
var newWindow = window.open("", "_blank", "width=400,height=300");
newWindow.document.open();
newWindow.document.write(htmlContent);
newWindow.document.close();
}).openWindow3(); // Aquí llama a la función del servidor
}
</script>
</body>
</html>
y asi sucesivamente hasta la ventana seis
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>Ventana 3</h1>
<p>Esta es la tercera ventana.</p>
<button onclick="openWindow4()">Abrir Ventana 4</button>
<script>
function openWindow4() {
google.script.run.withSuccessHandler(function(htmlContent) {
var newWindow = window.open("", "_blank", "width=400,height=300");
newWindow.document.open();
newWindow.document.write(htmlContent);
newWindow.document.close();
}).openWindow4();
}
</script>
</body>
</html>