Programación Web y Scripting > JavaScript
Problema Con Href
(1/1)
zaida20:
Hola a todos, tengo los suiguientes archivos:
anadir_blog.php
--- Código: Text --- <table width="494" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="25"> </td> <td width="24"> </td> <td width="266" valign="top"><table width="260" border="0" cellspacing="0" cellpadding="0"> <tr> <td><iframe name="iframe_imagenes" frameborder="0" style=" width:265px;height:130px;" scrolling="no" src="imagenes_blog.php"></iframe></td> </tr> </table> </td> <td width="179" valign="top"> <table width="80" border="0" cellspacing="0" cellpadding="0"> <tr> <td><iframe name="iframe_grande" frameborder="0" style=" width:170px;height:115px;" scrolling="no" src="imagenes_grandes.php"></iframe></td> </tr> </table>
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 ---<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]?>'">
É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 ---<?phpsession_start();$ruta_imagen=$_GET['imagen'];echo $ruta_imagen;?>
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:
zaida20:
¡¡¡¡¡solucionado!!!! :kicking:
imagenes_blog.php(antes)
--- Código: Text ---<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]?>'">
imagenes_blog.php(ahora)
--- Código: Text ---<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;?>'">
imagenes_grande.php (antes)
--- Código: Text ---<?phpsession_start();$ruta_imagen=$_GET['imagen'];echo $ruta_imagen;?>
imagenes_grande.php (ahora)
--- Código: Text ---<?phpsession_start();$foto=$_SESSION['foto'];//recogemos lo que recibe de $i$ruta_imagen=$_GET['imagen'];echo $foto[$ruta_imagen];?>
Espero que le sirva a alguien, saludos!!! :hola:
Navegación
Ir a la versión completa