![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
10/04/2002, 23:28
|
![Avatar de Kaopectate](http://static.forosdelweb.com/customavatars/avatar14704_1.gif) | Colaborador | | Fecha de Ingreso: diciembre-2001 Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 23 años, 1 mes Puntos: 38 | |
Re: Preguntilla Facil Sobre Ventanas Secundarias Pruébalo asi:
Código:
<html>
<head>
<script languaje="JavaScript">
var nPop = 0;
function nuevaVentana(){
var sImg = document.formulario.imagen.value;
var nAncho = document.formulario.ancho.value;
var nAlto = document.formulario.alto.value;
var oPop = window.open();
oPop.document.open();
oPop.document.write("<html>");
oPop.document.write("<head>");
oPop.document.write("<script language='JavaScript'>");
oPop.document.write("function popUp0(){");
oPop.document.write("moveTo(" + nPop + "," + nPop + ");");
oPop.document.write("resizeTo(" + nAncho + ", " + nAlto + ");}");
oPop.document.write("</" + "script>");
oPop.document.write("</head>");
oPop.document.write("<body onload='popUp0()'>");
oPop.document.write("<img src='" + sImg + "'>");
oPop.document.write("</body>");
oPop.document.write("</html>");
oPop.document.close();
nPop += 50;
}
</script>
</head>
<body>
<form name="formulario">
Imagen:
<input type="text" name="imagen"><br>
Ancho:
<input type="text" name="ancho"><br>
Alto:
<input type="text" name="alto"><br><br>
<input type="button" name="boton" onclick="nuevaVentana()" value="Nuevo PopUp">
</form>
</body>
</html>
Suerte. |