Ver Mensaje Individual
  #14 (permalink)  
Antiguo 24/10/2005, 12:25
cacr
 
Fecha de Ingreso: agosto-2005
Ubicación: Mérida, Venezuela
Mensajes: 732
Antigüedad: 18 años, 8 meses
Puntos: 7
es decir, que el top me debería servir para referirme al padre... o al abuelo, cierto?

Pues a mi no me funciona!

Fíjense como lo tengo,

Código HTML:
<?php
  // sesion.php
  include("../pages/includes/funciones.php");
  session_start();
?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Encuestas</title>
</head>
<body>
  <table>
    <tbody>
      <tr>
        <TD align="center" colspan="2">Bienvenid@!<br></TD>
      </tr>
      <tr><TD height="20"></TD><tr>
    </tbody>
  </table>
<hr><?php
$usuario=$_REQUEST[usr];
  $clave=$_REQUEST[clv];
  if ( !empty($usuario) && !empty($clave) ) {
    $clave_enc=md5($clave);
    $q_consulta="SELECT * FROM album_personal WHERE usuario='$usuario' AND clave='$clave_enc' AND activo='1'";
    $r_consulta=pg_query($q_consulta);
    $c_consulta=pg_num_rows($r_consulta);
    if ($c_consulta>0) {
      $_SESSION['usuario']=$usuario;
    ?><script language="JavaScript" type="text/javascript">
        window.opener.parent.top.location.reload();
        alert('Has iniciado sesión correctamente');
        window.close();
      </script>
      <?php
    }
  }
?><FORM name="iniciar" method="POST">
    <table align="center" border="0" cellpadding="2" cellspacing="2">
      <tbody>
        <tr><TD height="30"></TD></tr>
        <TR>
          <TD>Nick:</TD>
          <TD><INPUT type="text" name="usr" size="15"></TD>
        </TR>
        <TR>
          <TD>Clave:</TD>
          <TD><INPUT type="password" name="clv" size="15"></TD>
        </TR>
        <tr><></TD></tr>
      </tbody>
    </table><hr>
    <table>
      <tbody>  
        <TR><TD></TD></TR>
        <TR>
          <TD align="center" height="40" colspan="2">
            <A href="#" onclick="javascript: asesion();"><IMG src="../img-galeria/okbtn.gif" border="0"></A>
          </TD>
        </TR>
      </tbody>
    </table>
  </FORM>
</body>
</html> 
así funciona con la ventana del padre...

Si cambio,
window.opener.parent.top.location.reload();

por top.location.reload(); ó por parent.location.reload(); sencillamente deja de funcionar... y ni hablar del parent.parent...
__________________
Gracias de todas todas
-----
Linux!