Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/01/2008, 17:49
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, 9 meses
Puntos: 834
Re: Recarga pagina padre en x segundos

Fijate si esto te sirve:
página principal:
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>test</title>
<
script>
//recarga con pausa de 3000 milisegundos
function esperarYrecargar(){
    
setTimeout(function(){location.reload();},3000);
}
function 
ventana(){
    
window.open('pepe.php','','width=500,height=500');
}
window.onload=function(){
    
document.getElementById('ppp').style.cursor='pointer';
    
document.getElementById('ppp').style.textDecoration='underline';
    
document.getElementById('ppp').onclick=ventana;
    
alert('cargo');
}
</script>
</head>

<body>
<p id="ppp">abrir</p>
</body>
</html> 
Página secundaria:
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>test</title>
<
script>
function 
cerrar(){
opener.esperarYrecargar();
close();
}
window.onload=function(){
document.getElementById('pp').style.cursor='pointer';
document.getElementById('pp').style.textDecoration='underline';
document.getElementById('pp').onclick=cerrar;
}
</script>
</head>

<body>
<p id="pp">cerrar</p>
</body>
</html>