Foros del Web » Programando para Internet » PHP »

frame que se carga 2 veces

Estas en el tema de frame que se carga 2 veces en el foro de PHP en Foros del Web. Hola, tengo una web donde al hacer login, me carga 2 veces tanto el frame superior como el inferior, pero al darle a actualizar al ...
  #1 (permalink)  
Antiguo 11/09/2008, 05:10
 
Fecha de Ingreso: junio-2007
Ubicación: Cádiz
Mensajes: 369
Antigüedad: 16 años, 10 meses
Puntos: 7
frame que se carga 2 veces

Hola, tengo una web donde al hacer login, me carga 2 veces tanto el frame superior como el inferior, pero al darle a actualizar al navegador se soluciona quedandose 1 de ambos...a que creeis que puede deberse??

Código:
<frameset rows="165,*,44" frameborder="no" border="0" framespacing="0">
  <frame src="topframe.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="inicio.php" name="mainFrame" id="mainFrame" title="mainFrame" />
  <frame src="bottomframe.html" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>
  #2 (permalink)  
Antiguo 11/09/2008, 09:06
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Respuesta: frame que se carga 2 veces

Hola manguiti

Si pones el código que usas para hacer login, será más fácil ayudarte.

Mensaje movido al foro de PHP desde Editores Web.

Saludos,
  #3 (permalink)  
Antiguo 11/09/2008, 11:20
 
Fecha de Ingreso: junio-2007
Ubicación: Cádiz
Mensajes: 369
Antigüedad: 16 años, 10 meses
Puntos: 7
Respuesta: frame que se carga 2 veces

Es que no creo que sea por hacer el login, que lo unico que hace es comprobar los datos introducidos y si son correctos redirigir al index....

Código PHP:
//CAPTURO LA ENTRADA POST
$entrada_usuario=$_POST["usuario"];
$entrada_pass=$_POST["contrasena"];
// echo"$entrada_usuario,$entrada_pass";
//Ejecuto la sentencia
//echo ("SELECT * FROM usuarios WHERE 1 and usuario='$usuario' and contraseña='$contrasena'");
$query mysql_query("SELECT * FROM empleados WHERE 1 and Login='$entrada_usuario' and Password='$entrada_pass'");

//definimos un array
//list($id,$nombre,$us,$pass,$nivel) = mysql_fetch_array($query);
list($_Id,$Id_Cargo,$Nombre,$Apellidos,$DNI,$Fecha_alta,$us,$pass,$msj,$Atodos,$Administrador,$Letras,$Backup,$Expor,$Extra1,$Extra2,$Extra3,$Extra4,$Extra5) = mysql_fetch_array($query);

//vemos si el usuario y contraseña es válido
//llamamos los arrays en las siguiente linea.
if (($_POST["usuario"]==$us) && ($_POST["contrasena"]==$pass)&&($_POST["usuario"]!='')&&($_POST["contrasena"]!=''))
{
//usuario y contraseña válidos
//defino una sesion y guardo datos
session_start();
session_register("autentificado");
$autentificado "SI";
session_register("usuario");
$usuario $us;
session_register("id_usuario");
$id_usuario $_Id;
session_register("cargodeusuario");
$cargodeusuario=$Id_Cargo;
session_register("admin");
$admin $Administrador;
session_register("Mensajes");
$Mensajes=$msj;
session_register("BU");
$BU=$Backup;
session_register("Exportar");
$Exportar=$Expor;
session_register("debug");
$debug $Letras;

//header ("Location: inicio.php");
echo "<script>location.href='index.php'</script>";
//ECHO "EXISTE usuario = $us, nombre = $nombre";

  #4 (permalink)  
Antiguo 11/09/2008, 11:23
 
Fecha de Ingreso: junio-2007
Ubicación: Cádiz
Mensajes: 369
Antigüedad: 16 años, 10 meses
Puntos: 7
Respuesta: frame que se carga 2 veces

yo creo que el error estará tanto en el "topframe" como en el "bottomframe"....os paso parte del codigo del bottom frame...a ver si veis algo, puede ser en el evento onload??

......


Código HTML:
<body onload="MM_preloadImages('images/bot-clientes-over.gif','images/bot-ordenes-over.gif','images/bot-operaciones-over.gif','images/bot-trabext-over.gif','images/bot-provee-over.gif','images/bot-pedidos-over.gif','images/bot-disconf-over.gif','images/bot-historial-over.gif','images/bot-back-over.gif','images/bot-inicio-over.gif')">

<table width="100%" height="44" border="0" cellpadding="0" cellspacing="0" background="http://www.forosdelweb.com/images/fondo-pie.gif">

  <tr>

    <td align="center" valign="bottom"><table width="590" border="0" cellspacing="0" cellpadding="0">

      <tr>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="inicio.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-inicio.gif" alt="INICIO" width="34" height="19" border="0" id="Image10" onmouseover="MM_swapImage('Image10','','images/bot-inicio-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="clientes.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-clientes.gif" alt="CLIENTES" name="Image1" width="49" height="19" border="0" id="Image1" onmouseover="MM_swapImage('Image1','','images/bot-clientes-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="ordenes.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-ordenes.gif" alt="&Oacute;RDENES" name="Image2" width="52" height="19" border="0" id="Image2" onmouseover="MM_swapImage('Image2','','images/bot-ordenes-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="ordenes.php?Historial=fact" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-operaciones.gif" alt="PEND FACTURAR" name="Image3" width="72" height="19" border="0" id="Image3" onmouseover="MM_swapImage('Image3','','images/bot-operaciones-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="trabajos_externos.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-trabext.gif" alt="TRABAJOS EXTERNOS" name="Image4" width="97" height="19" border="0" id="Image4" onmouseover="MM_swapImage('Image4','','images/bot-trabext-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="proveedores.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-provee.gif" alt="PROVEEDORES" name="Image5" width="72" height="19" border="0" id="Image5" onmouseover="MM_swapImage('Image5','','images/bot-provee-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="pedidos.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-pedidos.gif" alt="PEDIDOS" name="Image6" width="48" height="19" border="0" id="Image6" onmouseover="MM_swapImage('Image6','','images/bot-pedidos-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="disconformidades.php" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-disconf.gif" alt="DISCONF." name="Image7" width="50" height="19" border="0" id="Image7" onmouseover="MM_swapImage('Image7','','images/bot-disconf-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="ordenes.php?Historial=si" target="mainFrame"><img src="http://www.forosdelweb.com/images/bot-historial.gif" alt="HISTORIAL" name="Image8" width="49" height="19" border="0" id="Image8" onmouseover="MM_swapImage('Image8','','images/bot-historial-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

        <td><a href="./BACKUP/backup.php" target='_BLANCK'><img src="http://www.forosdelweb.com/images/bot-back.gif" alt="BACKUP" name="Image9" width="45" height="19" border="0" id="Image9" onmouseover="MM_swapImage('Image9','','images/bot-back-over.gif',1)" onmouseout="MM_swapImgRestore()" /></a></td>

        <td width="2" bgcolor="#FFFFFF"><img src="http://www.forosdelweb.com/images/spacer.gif" width="2" height="19" /></td>

      </tr>

    </table></td>

  </tr>

  <tr>

    <td height="25" align="right" valign="bottom"><img src="http://www.forosdelweb.com/images/img-pie.gif" alt="DIGITAL IMPRESI&Oacute;N" width="160" height="25" /></td>

  </tr>

</table>

</body> 

Última edición por manguiti; 11/09/2008 a las 11:28 Razón: aparece enlace a otra pagina
  #5 (permalink)  
Antiguo 11/09/2008, 16:11
 
Fecha de Ingreso: junio-2007
Ubicación: Cádiz
Mensajes: 369
Antigüedad: 16 años, 10 meses
Puntos: 7
Respuesta: frame que se carga 2 veces

nadie ve nada anormal en el bottomframe???
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:07.