I'm not sure if this is possible, plus it will be very hard to explain.
I have a gallery started and have 7 random images above the image to be shown.
I'm using the ever popular lightbox JSV2
This is working smoothly via a DB.
Now what I would like to do is when the thumbnail is moused on and over a variable is set further down the script.
Here is what I have so far (simplified for show)
<table>
<tr>
<td>
<?PHP
$query=mysql_query("SELECT * FROM `upload` WHERE `active` = 1 ORDER BY RAND() LIMIT 7") or die(mysql_error());
while ($r = mysql_fetch_assoc($query))
{
?>
<a href="<?PHP echo $file_full ?>" rel="lightbox[all]" title="<?PHP echo $r['info'];?>" onmouseover="document.main.src='<?PHP echo $file_m; ?>;<?PHP $text = $r['info'];?>'" onmouseout="document.main.src='<?PHP echo $file_m; ?>;<?PHP $text = $r['info'];?>'"><img src="<?PHP echo $file_t; ?>" class="pic_border" /></a>
<?PHP } ?>
</td>
</tr>
<tr>
<td align="center" valign="top">
<img src="images/users/bg.jpg" name="main" id="main" style="height:<?PHP echo $r['height']; ?>;" class="pic_border_larger" />
<br />
<!-- ####Line below is what we are trying to make dynamic####-->
<?PHP echo $text;?>
</td>
</tr>
</table>
Notice on the onmouseover and onmouseout I added an extra elementonmouseover="document.main.src='<?PHP echo $file_m; ?>;<?PHP $text = $r['info'];?>'" onmouseout="document.main.src='<?PHP echo $file_m; ?>;<?PHP $text = $r['info'];?>'"I was hoping the $text variable would change, but of course how could it. The page needs to refresh.
Here's a link to my work in progress
Linky
You will see on mouseover the larger image change. Below that is where I would like the $text changed each image.
The $text variable will show the last thumbnail text.
Thank you for your time
Edited by Hooch, 31 July 2008 - 08:01 AM.
