Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/11/2010, 10:25
My_lady
 
Fecha de Ingreso: marzo-2004
Mensajes: 35
Antigüedad: 20 años, 1 mes
Puntos: 0
Respuesta: Javascript/PHP: $row sólo devuelve primer registro

Hala, ya no hace falta que respondáis. Al final era lo de las id.

Código:
$html = $html. "<td><b><a href = javascript:void(0) onclick =document.getElementById('".$row["cod_prin"]."').style.display='block';document.getElementById('fade').style.display='block'>".$row["funcion"]."</a></b><div id=".$row["cod_prin"]." class=white_content>";
$html = $html. devolver("select comentario from funcion where funcion.cod_prin =".$row["cod_prin"]);
$html = $html. "<p><a href = javascript:void(0) onclick =document.getElementById('".$row["cod_prin"]."').style.display='none';document.getElementById('fade').style.display='none'>Cerrar</a></div>
<div id=fade class=black_overlay></div>
</td>";