Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/10/2008, 16:16
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: problema con popup ajax

Hola gisek,

El problema es que tu debes de pasarle por parámetro el id, en tiempo de ejecución no al dibujar tu pagina, debes de hacer algo así:
Código html:
Ver original
  1. <tr>
  2. <th>N°</th>
  3. <th>Clave</th>
  4. <th>cliente</th>
  5. <th>Archivos</th>
  6. </tr>
  7. <?
  8. $sql="SELECT clientes.id_adg,
  9. clientes.id_cliente,
  10. clientes.nombre
  11. FROM clientes
  12. $res=mysql_query($sql);
  13. while($registro=mysql_fetch_array($res))
  14. {
  15. $s = $registro[id_adg];
  16. ?>
  17. <tr>
  18. <td><? echo $registro["id_adg"]; ?></td>
  19. <td><? echo $registro["id_cliente"]; ?></td>
  20. <td><? echo $registro["nombre"]; ?></td>
  21. <td align="center"><a href='#'onclick="openModalDialog('<?php echo $s; ?>')">Files</a></td>
  22. </tr>
  23. <? } ?>
  24. <script type="text/javascript" language="javascript">
  25. function openModalDialog(id) {
  26. var win = new Window('cliente', {
  27. className: "alphacube",
  28. title: "Archivo Digital",
  29. width:600,
  30. height:500,
  31. opacity:.88,
  32. resizable: false,
  33. maximizable: false,
  34. minimizable: false,
  35. url: 'getdat.php?id=' + id,
  36. }
  37. )
  38. win.setDestroyOnClose();
  39. win.show(true);
  40. win.showCenter();
  41. };

Saludos.