
Image mouseover from DB won't load in the right image holder
Now i've solved 50% of my problem,
Whats happening now is that all the larger images appear in the same image holder (the one in the first row).
http://www.vitrail-entete.com/tdj/quoi_de_neuf_test.php
you may have to click the above link, and then click in the adress bar and hit enter, to view the page.
Any idea ?
I'm not a php expert but I guess my Image holder table is not at the right place in the code?
Javascript code...
Code:
function show_large_image(obj)
{
var large_image_obj = document.getElementById("image_holder");
large_image_obj.src = obj.src;
}
Php code...
Code:
$result = mysql_query("SELECT * FROM AlbumTable WHERE AlbumCategorie = 'Que se passe t-il' order by AlbumId DESC");
while($row = mysql_fetch_assoc($result)) {
//MY TITLE AND TEXT TABLE
echo "<span class='style1'>";
echo "<table border=0 width=510>";
echo "<tr>";
echo "<td align=center><b>$row[AlbumTitre]</b>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=center>$row[AlbumTexte]";
echo "
";
echo "</td>";
echo "</tr>";
echo "</table>";
//MY LARGE IMAGE HOLDER TABLE
echo "<table border=0 width=510>";echo "<tr>";
echo "<td align=center colspan=4>";
echo "<img id='image_holder' border='1' width='400' height='300' src='images/transparent.gif' />";
echo "</td>";
echo "</tr>";
echo "</table>";
//MY THUMBNAILS TABLE
$col = 0;
echo"[align=center]";
echo "<table border=0 width=210>";
$AlbumId = $row[AlbumId];
$result2 = mysql_query("SELECT * FROM PhotosTable WHERE PhotosId = '$AlbumId' order by Date DESC");
while($row = mysql_fetch_assoc($result2)) {
if ($col == 0)
echo "<tr>";
$PathG = '/' . 'tdj' . $row['PhotosPathG'];
echo "<td align=center><img border='1' src='$PathG' onmouseover='show_large_image(this)' return false;\" width='100' height=
'70' />";
echo "</td>";
$col++;
if ($col == 4)
{
echo "</tr>";
$col = 0;
}
}
echo "</table>";
echo "[/align]";
echo"
";
echo "</span>";
}
Anyone know the problem?
Thanks in advance for your help