• Martes 30 de Abril de 2024, 02:24

Autor Tema:  Problema Con Href  (Leído 1276 veces)

zaida20

  • Miembro MUY activo
  • ***
  • Mensajes: 213
    • Ver Perfil
Problema Con Href
« en: Lunes 23 de Julio de 2007, 12:02 »
0
Hola a todos, tengo los suiguientes archivos:

anadir_blog.php

Código: Text
  1.                           <table width="494" border="0" cellspacing="0" cellpadding="0">
  2.                             <tr>
  3.                               <td width="25"> </td>
  4.                               <td width="24"> </td>
  5.                               <td width="266" valign="top">
  6. <table width="260" border="0" cellspacing="0" cellpadding="0">
  7.                                   <tr>
  8.                                     <td><iframe name="iframe_imagenes" frameborder="0" style=" width:265px;height:130px;" scrolling="no" src="imagenes_blog.php"></iframe></td>
  9.                                   </tr>
  10.                                 </table>
  11.                               </td>
  12.                               <td width="179" valign="top"> <table width="80" border="0" cellspacing="0" cellpadding="0">
  13.                                   <tr>
  14.                                     <td><iframe name="iframe_grande" frameborder="0" style=" width:170px;height:115px;" scrolling="no" src="imagenes_grandes.php"></iframe></td>
  15.                                   </tr>
  16.                                 </table>
  17.  

En éste archivo tengo una tabla con dos iframe, en el primero se visualizan las imagénes que se van a subir a la web con tamaño reducido, en el segundo iframe se muestra la imagen que selecciones en el primer iframe pero a tamaño real.


imagenes_blog.php

Código: Text
  1. <img src="../../img/ojo.gif" alt="Ver a tamaño real" width="15" height="15" style="cursor:pointer" onclick="mostrar_iframe(); parent.document.iframe_grande.location.href='imagenes_grande.php?imagen=<?php echo $popo[$i]?>'">
  2.  

Éste es el iframe dónde se visualizan las imaénes que se van a subir a la web, contiene una imagen con un evento onclick.

imagenes_grande.php

Código: Text
  1. <?php
  2. session_start();
  3. $ruta_imagen=$_GET['imagen'];
  4. echo $ruta_imagen;
  5. ?>
  6.  

En éste iframe se visualiza la imagen que pinchemos para visualizarla a tamaño real.

El problema es que al ejecutarlo me dice que no se encuentra la página, refiriéndose al segundo iframe. ¿alguien sabe por qué? creo que está todo correcto.

Saludos y gracias  :hola:
---- Las oportunidades que se te presentan son las que son y ellas te llevarán a la felicidad ----

zaida20

  • Miembro MUY activo
  • ***
  • Mensajes: 213
    • Ver Perfil
Re: Problema Con Href
« Respuesta #1 en: Lunes 23 de Julio de 2007, 14:34 »
0
¡¡¡¡¡solucionado!!!! :kicking:

imagenes_blog.php(antes)

Código: Text
  1. <img src="../../img/ojo.gif" alt="Ver a tamaño real" width="15" height="15" style="cursor:pointer" onclick="mostrar_iframe(); parent.document.iframe_grande.location.href='imagenes_grande.php?imagen=<?php echo $popo[$i]?>'">
  2.  

imagenes_blog.php(ahora)

Código: Text
  1. <img src="../../img/ojo.gif" alt="Ver a tamaño real" width="15" height="15" style="cursor:pointer" onclick="parent.document.grande.location.href='imagenes_grande.php?imagen=<?php echo $i;?>'">
  2.  

imagenes_grande.php (antes)

Código: Text
  1. <?php
  2. session_start();
  3. $ruta_imagen=$_GET['imagen'];
  4. echo $ruta_imagen;
  5. ?>
  6.  

imagenes_grande.php (ahora)

Código: Text
  1. <?php
  2. session_start();
  3. $foto=$_SESSION['foto'];//recogemos lo que recibe de $i
  4. $ruta_imagen=$_GET['imagen'];
  5. echo $foto[$ruta_imagen];
  6. ?>
  7.  

Espero que le sirva a alguien, saludos!!! :hola:
---- Las oportunidades que se te presentan son las que son y ellas te llevarán a la felicidad ----