Foros del Web » Programando para Internet » Javascript »

aporte...VISUALIZAR IMAGEN "N" AL DAR CLICK A IMAGE_1

Estas en el tema de aporte...VISUALIZAR IMAGEN "N" AL DAR CLICK A IMAGE_1 en el foro de Javascript en Foros del Web. Les comparto el script, el cual se trata que al pasar el mouse por una imagen prediseñada se visualiza la imagen del listado que esta ...
  #1 (permalink)  
Antiguo 01/08/2008, 13:59
Avatar de hoberwilly  
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 15 años, 10 meses
Puntos: 2
De acuerdo aporte...VISUALIZAR IMAGEN "N" AL DAR CLICK A IMAGE_1

Les comparto el script, el cual se trata que al pasar el mouse por una imagen prediseñada se visualiza la imagen del listado que esta guardada en la bd...

<?php
mysql_connect("localhost","xxx","") or die ("no se ha podido conectar a la BD");
mysql_select_db("tu_db") or die ("no se ha podido seleccionar la BD");
$sql = "SELECT id,archivo_nombre FROM archivos";
$consulta = mysql_query($sql) or die ("No se pudo ejecutar la consulta");
?>
<html>
<head>
<style type='text/css'>
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: none;
padding: 5px;
left: -100px;
border: none;
visibility: hidden;
color: #FFFF00;
text-decoration: none;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 50px; /*position where enlarged image should offset horizontally */
}
</style>

</head>
</head>
<body>
<table>
<?php
While ($registro=mysql_fetch_assoc($consulta)){
?>
<tr>
<td>
<a class="thumbnail" href="#thumb" target="_blank"><img src="table_background_man_on_board.gif" width="17" height="20" border="0" /><span><?php echo "<img src=\"thumbnail.php?id=".$registro['id']."\">"; ?><br /></span></a>
</td>
<td><?php echo $registro['archivo_nombre'] ?></td>
<?php } ?>
</table>
</body>
</html>
  #2 (permalink)  
Antiguo 01/08/2008, 15:21
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: aporte...VISUALIZAR IMAGEN "N" AL DAR CLICK A IMAGE_1

Tema trasladado a Javascript.
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 00:33.