I am displaying pictures on a table which are loaded dynamically, ok. Now I just want to make those pictures clickable so that i pass a parameter to a Function .
It is not like passing a url parameter through something like asasf.php?id =
because it has to activate a function, so in the case of a picture, it would be onclick="showUser(parameter ...
So, actually I think what I described above, could be done in 1 step. That is, dynamically populating the table with the pictures BUT those pictures would already be active, (clickable) ...
Since it is a picture, well its line refers rather to the name of the picture such as maria.jpg that would do, (although the picture id would also do but that would mean adding yet another parameter in that line).
After that I should be ok, but I cant get the syntax for that.
Here it is:
Code: Select all
echo "<td>" . "<img name ="($row['name'])" . onclick="showUser(this.name)" . src='".htmlspecialchars($row['picname'])."' width=50 height=50 href >". "</td>";
If anybody knows how to solve that, that would be phaenomenal.
thanks a lot. I ll stay tuned like a spinster on the phone.
Emi
====================================================================================================================================