Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/01/2013, 18:35
petruzki
 
Fecha de Ingreso: octubre-2012
Ubicación: México
Mensajes: 2
Antigüedad: 11 años, 6 meses
Puntos: 0
Cerrar ultima ventana abierta JavaScript

Estoy haciendo una pagina donde abro ventanas emergentes para mostrar información con este script

<script language="javascript">
function ventana1()
{
window.open('info.html','','titlebars=0, toolbar=0,scrollbars=0,location=0,statusbar=0,menu bar=0,resizable=0,width=330,height=330');
}

function ventana2()
{
window.open('info2.html','','titlebars=0, toolbar=0,scrollbars=0,location=0,statusbar=0,menu bar=0,resizable=0,width=330,height=330');
}

</script>

En el body
<a href="javascript:ventana1()">abrir 1</a>
<a href="javascript:ventana2()">abrir 2</a>

Pero quisiera que al abrir ventana 1, se cerrara ventana 2 para no tener el monton de ventanas emergentes abiertas o que por ejemplo al presionar abrir ventana 1 y ya este abierta no me la vuelva abrir.