img reference in embedded HTML

Permalink
Just getting started using Concrete5 (I love it so far...). I'm creating a page of photos using HTML blocks. Each photo is a thumbnail that onmouseover expands to full image size, and onmouseout returns to thumbnail size. All well and good. But is there a clean way to reference the image location in the html code without going to the actual directory where the image is stored? For example, my HTML snippet for one single image looks something like:

<script type="text/javascript">
function showImage(w,h,image) {
var obj=document.getElementById("display").style;
obj.display="block";
obj.width=w+"px";
obj.height=h+"px"
obj.background="url("+image+")";
}
</script>

<img id="display" src="files/2213/3964/6355/myimg.jpg"
alt="My Image" height="40" width="60" onmouseover="showImage('578', '525', 'myimg.jpg');"
onmouseout="showImage('60', '40', 'myimg.jpg');" />

The only way I can get the initial thumbnail to display is to include the full "files/2213/3964/6355/myimg.jpg" path in the src. Interestingly, the full path isn't needed on the event handlers.

Thanks.

 
JohntheFish replied on at Permalink Reply
JohntheFish
Have a look at the list files in set addon.