como hacer un popup con tiempo

kata
11 de Junio del 2004
Me gustaria saber como puedo hacer que un popup se mantenga durante un cierto tiempo y desaparezca y vualva a aparecer y como podria moverse sobre toda la pagina

rsalvadores
11 de Junio del 2004
Joder!! tu no quieres hacer un popUp, tu quieres una tortura...

<html>
<head><title>PopupTortura</title>
</head>
<script>
var abierto=false
var x=2,y=2
function abrePopup(){
abrir()
timer=setInterval(abrir,8000) //8000=8sg
}

function abrir(){
if (abierto){
abierto=false
clearInterval(timer2)
miW.close()
}
else{
miW=window.open("W2.htm","miW","left=200 top=400 width=200 height=200")
abierto=true
timer2=setInterval(mover,5)
}
}

function mover() {
if (abierto) miW.moveBy(x,y);
if (miW.screenLeft>600) x=-2
if (miW.screenLeft<50) x=2
if (miW.screenTop>400) y=-2
if (miW.screenTop<100) y=2
}
</script>
<body>
<a href="#" onclick="Javascipt:abrePopup()">Abrir Tortura</a>
</body>
</html>

Para el movimiento puedes jugar con la resolución del cliente y demás.

Suerte , y lo siento por los usuarios de tu página.

rsalvadores