# Help with links in gallery

**URL:** <https://forum.kirupa.com/t/help-with-links-in-gallery/238477>\
**Category:** programming\
**Created:** [September 11, 2007, 6:22pm UTC](https://forum.kirupa.com/t/help-with-links-in-gallery/238477 "2007-09-11T18:22:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ht56y](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ht56y/32/3583_2.png) [@ht56y](https://forum.kirupa.com/u/ht56y)\
**Post date:** [September 11, 2007, 6:22pm UTC](https://forum.kirupa.com/t/help-with-links-in-gallery/238477/1 "2007-09-11T18:22:24Z")

</div>

Hi.

I am building a gallery for a booking company, you can see it here:

[http://www.balkanfestudvalget.dk/TEST/index.php?location=galleri](http://www.balkanfestudvalget.dk/TEST/index.php?location=galleri)

My problem is:

When you click on one of the thumbnails, it opens a div that is the image container/viewer. But how do change the image path in the div so it matches the click’ed thumbnail.

The code looks something like this:

_for the thumbnails:_

> ```
> echo "&lt;td width='10'&gt;&nbsp;&lt;/td&gt;&lt;td&gt;&lt;table width='80' border='0' cellpadding='0' cellspacing='0' bgcolor='#383b30'&gt;
> 
> ```

```
              &lt;tr&gt;
                &lt;td height='80' onmouseover=\"this.style.backgroundColor='#676c58';\" onmouseout=\"this.style.backgroundColor='#383b30';\" align='center'&gt;&lt;a href='#' onclick='showBox();return false'&gt;&lt;img src='Billeder/Thumbs/tmb",$tmbpath,".jpg' width='70' height='70' border='0' /&gt;&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;&lt;/td&gt;";

```

_and the code in the div:_

> \<div id=“overlay” style=“display:none”\>\</div\>  
> \<div id=“box” style=“display:none”\>  
> \<img id=“close” src=“Assets/content/close\_btn.jpg” width=“25” height=“25” onclick=“hideBox()” alt=“Luk dette vindue”  
> title=“Luk dette vindue” /\>  
> \<img src=“Billeder/img01.jpg” onclick=“hideBox()” style=“cursor:pointer” /\> \</div\>
