Foros del Web » Programando para Internet » Javascript »

Ayuda imagen pop up

Estas en el tema de Ayuda imagen pop up en el foro de Javascript en Foros del Web. Saludos tengo una galeria de productos donde los mismos son llamados desde una base de datos.. pero deseo hacer q mi imagen al hacer click ...
  #1 (permalink)  
Antiguo 21/11/2007, 08:13
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Ayuda imagen pop up

Saludos tengo una galeria de productos donde los mismos son llamados desde una base de datos.. pero deseo hacer q mi imagen al hacer click salga en ventana emergente... alguin podria decirme q codigo debo usar como link?? ...

Saludos y gracias de antemano!!!
  #2 (permalink)  
Antiguo 21/11/2007, 08:47
Avatar de T4ke0veR  
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Re: Ayuda imagen pop up

bueno me encargue de medio desarrollar el codigo... me gustaria lo checaran pues me da error y no hace el llamado a la funcion =(

ficha_producto.php
Código PHP:
<?php require_once('Connections/listproduc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$colname_Recordset1 "-1";
if (isset(
$_GET['PKID'])) {
  
$colname_Recordset1 $_GET['PKID'];
}
mysql_select_db($database_listproduc$listproduc);
$query_Recordset1 sprintf("SELECT * FROM producto WHERE PKID = %s"GetSQLValueString($colname_Recordset1"int"));
$Recordset1 mysql_query($query_Recordset1$listproduc) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
 
                               function 
imagengrande() 

window.open("verimagen.php?imagen=/iamges2/<?=$imagen;?>""""width=400,height=400"); 
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>.. // O C E A N P L A S T // ..</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
td img {display: block;}body {
    background-color: #010101;
}
.style1 {    font-family: Tahoma;
    font-size: 10px;
    color: #B9CBD9;
}
.style2 {color: #FAFAF8}
</style>
<!--Fireworks CS3 Dreamweaver CS3 target.  Created Mon Sep 17 15:30:44 GMT-0400 2007-->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="css/estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style3 {font-size: 11px}
-->
</style>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="layout2.png" fwpage="quienes somos" fwbase="quienes.jpg" fwstyle="Dreamweaver" fwdocid = "857149810" fwnested="0" -->
  <tr>
   <td><img src="images/spacer.gif" width="112" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="113" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="9" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="88" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="26" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="79" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="13" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="101" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="10" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="96" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="113" height="1" border="0" alt="" /></td>
   <td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
  </tr>

  <tr>
   <td colspan="11" rowspan="3" align="left" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td bgcolor="#FFFFFF"><table width="760" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="167" valign="top" background="images/bg.gif" bgcolor="#000000"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','167','height','388','src','menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','menu' ); //end AC code
</script>
           <noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="167" height="388">
             <param name="movie" value="menu.swf" />
             <param name="quality" value="high" />
             <embed src="menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="167" height="388"></embed>
           </object></noscript></td>
           <td width="593" rowspan="2" align="left" valign="top" background="images/bg2.gif"><table width="593" border="0" cellspacing="0" cellpadding="0">
             <tr>
               <td width="593" height="103" align="left" valign="top"><table width="593" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                   <td width="317" height="103" rowspan="2"><img src="images/producto.jpg" width="317" height="103" /></td>
                   <td width="276" align="left" valign="top"><img src="images/productoinicio.jpg" width="276" height="30" /></td>
                 </tr>
                 <tr>
                   <td align="left" valign="top"><img src="images/productofon1.jpg" width="276" height="73" /></td>
                 </tr>
               </table></td>
             </tr>
             <tr>
               <td align="left" valign="top" bgcolor="#000000"><table width="586" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                   <td><img src="images/productoinfoA.jpg" width="586" height="20" /></td>
                 </tr>
                 <tr>
                   <td><img src="images/productoinfoB.jpg" width="586" height="9" /></td>
                 </tr>
                 <tr>
                   <td><table width="586" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                       <td width="30" height="194" background="images/productointe1.jpg">&nbsp;</td>
                       <td bgcolor="#D7E2E6"><table width="94%" border="0" cellspacing="0" cellpadding="0">
                         <tr>
                           <td width="40%" valign="top"><table width="126%" border="0" cellspacing="0" cellpadding="0">
                             <tr>
                               <td class="tituloPROD"><br />
                                 <?php echo $row_Recordset1['nombre']; ?></td>
                             </tr>
                             
                           </table>
                             <table width="124%" border="0" cellpadding="0" cellspacing="0">
                               <tr>
                                 <td><font class="descPROD"><br />
                                       <?php echo $row_Recordset1['descripcion']; ?></font></td>
                               </tr>
                               <tr>
                                 <td>&nbsp;</td>
                               </tr>
                               <tr>
                                 <td><div align="right"><a href="productos.php" class="textoINDEX">&lt; Volver</a></div></td>
                               </tr>
                             </table></td>
                           <td width="60%"><div align="center"><br />                             
                               <a href="javascript:imagengrande()"><img src="images2/<?php echo $row_Recordset1['imagen']; ?>" width="200" height="200" border="1" />
verimagen.php
Código PHP:
<?php 

include_once "Connections/listproduc.php"

$sql "SELECT * FROM producto WHERE imagen = '$_REQUEST[imagen]'"
$query mysql_query($sql) or die(mysql_error()); 



if (
$contar == 0



else 

while (
$fila mysql_fetch_array($query)) 

$imagen$fila['imagen']; 

?> 
<p><img src="images2/<?=$imagen;?>" border="0"> 
  <?php 


?>
</p>
  #3 (permalink)  
Antiguo 21/11/2007, 08:59
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Re: Ayuda imagen pop up

Hola:

Cuando hablas de eventos (como el "click") ya no te sirve de nada php y tienes que pensar en javascript, voy a reportar el mensaje para que lo pasen a ese foro, pero para que vayas adelantando, te recomiendo que mires las FAQs javascript, que es un tema bastante tratado.

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #4 (permalink)  
Antiguo 21/11/2007, 09:06
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: Ayuda imagen pop up

Tema trasladado a Javascript.

Porfavor publica en los foros correctos.
  #5 (permalink)  
Antiguo 21/11/2007, 09:14
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Re: Ayuda imagen pop up

Hola:

¡Qué rápido ha sido GatorV !:

Aparte de lo que hayas encontrado en las FAQs, te paso un mensaje en donde se habló de algo parecido:
Pop-up del tamaño de la imagen automaticamente.

Espero que te sirva.

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
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 16:23.