Ver Mensaje Individual
  #16 (permalink)  
Antiguo 21/07/2008, 11:35
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Poder abrir un window.open si no esta ya abierto

Para eso hay que cambiar el nombre del segundo parámetro del método open (_blank no sirve, hay que definir otro y mantenerlo constante). Además, habría que cerrarla al refrescar la página. Probá así:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title></title>
<
script>
var 
v;
function 
ventana(u,a,b){
    
v=window.open(u,'pp','width='+a+',height='+b);
    
v.focus();
}
window.onunload=function(){try{v.close();}catch(e){};}
</script>

</head>

<body>
<a href="javascript:ventana('http://www.google.com',500,500);void(0);">test</a>
</body>
</html>