Tema: Como POP PUP
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2003, 11:17
jperjim
Invitado
 
Mensajes: n/a
Puntos:
Encontre este código, se me hace interesante, al oprimir un boton abre un nuevo link parecido a POP PUP, pero sera posible de que al abrir la ventana inmediatamente se vaya al enlace sin tener que oprimir el boton y la pagina principal se cierre en automático?

Sera posible?

Espero me puedan ayudar.



<html>
<head>
</head>
<body>
<script language="JavaScript">

var ancho = 100
var alto = 100
var fin = 300
var x = 100
var y = 100

function inicio(){
ventana = window.open("hola.htm", "_blank", " resizable,height=1,width=1,top=x,left=y,screenX=x, screenY=y");
abre();
}

function abre(){
if (ancho <= fin) {
ventana.moveTo(x, y);
ventana.resizeTo(ancho, alto);
x += 5;
y += 5;
ancho += 15;
alto += 15;
timer = setTimeout("abre()", 1);
} else {
clearTimeout(timer);
}
}

</script>
<form>
<input type="button" value="Abrir Ventana" onClick="inicio()"></p>
</form>
</body>
</html>