Dinamic table <td> a variable
Publicado por GDP (20 intervenciones) el 06/05/2014 17:23:21
Como puedo guardar el valor de uno de los <td> generados mediante onlcik (o algo similar) en una variable. El problema es que al no tener ID no se como llamar al valor :S.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
echo
"<div id='users1'><table class='table' id='names'>
<tr class='tblhead'>
<th></th>
<th>Creation Date</th>
<th>Mss/Mr</th>
<th>First Name</th>
<th>Surname</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr class='tblinf' style='cursor:pointer' onclick='toggle(this)'>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['cmpdate'] . "</td>";
echo "<td>" . $row['prfx'] . "</td>";
echo "<td>" . $row['FNm'] . "</td>";
echo "<td>" . $row['SNm'] . "</td>";
echo "</tr>";
}
echo "</table></div>";
Valora esta pregunta


0