Click to See Complete Forum and Search --> : Thumbnail Script


janek68
08-04-2003, 10:10 AM
Hello,

I have this thumbnail script where when a thumbnail is clicked, a larger image is displayed under the thumbnail. What I am trying to do now is when a thumbnail is clicked and full size image displays, I want to have a description of the image displaying also. I have tried to figure this out but it isn't working for me. Is there any way of doing this? Below is the script. Any ideas are really appreciated.

Thanks

<table border="1" cellpadding="0" cellspacing="0" align=center>
<tr>
<td><a href="javascript:thumbtobig(1)"><img src="Header01.gif" width="50" height="50" name="T1" border=0></a></td>


<td><a href="javascript:thumbtobig(2)"><img src="Header01.gif" width="50" height="50" name="T2" border=0></a></td>

<td><a href="javascript:thumbtobig(3)"><img src="Header01.gif" width="50" height="50" name="T3" border=0></a></td>

<td><a href="javascript:thumbtobig(4)"><img
src="Header01.gif" width="50" height="50" name="T4" border=0></a></td>

<td><a href="javascript:thumbtobig(5)"><img src="Header01.gif"
width="50" height="50" name="T5" border=0></a></td>

<td><a href="javascript:thumbtobig(6)"><img
src="Header01.gif" width="50" height="50" name="T6" border=0></a></td>
</tr></table><br>

<center><img src="art.jpg" align="middle" width="" height="" border="2" name="large"></center>


<p><script language="JavaScript"><!--
//thumbnail script
thumb =new Image();
thumb2=new Image();
thumb3=new Image();
thumb4=new Image();
thumb5=new Image();
thumb6=new Image();

thumb.src ="art.jpg"
thumb2.src="gypsies.jpg"
thumb3.src="skein.jpg"
thumb4.src="le_gouter.jpg"
thumb5.src="music.jpg"
thumb6.src="sisters.jpg"

document.images['T1'].src=thumb.src;
document.images['T2'].src=thumb2.src;
document.images['T3'].src=thumb3.src;
document.images['T4'].src=thumb4.src;
document.images['T5'].src=thumb5.src;
document.images['T6'].src=thumb6.src;

test='test'
test1=document.write("test2")
function thumbtobig(thumbs)
{
if(thumbs==1){document.images['large'].src=thumb.src;
test}
if(thumbs==2){document.images['large'].src=thumb2.src;
test1}
if(thumbs==3){document.images['large'].src=thumb3.src;}
if(thumbs==4){document.images['large'].src=thumb4.src;}
if(thumbs==5){document.images['large'].src=thumb5.src;}
if(thumbs==6){document.images['large'].src=thumb6.src;}
}

// --></script></p>

David Harrison
08-04-2003, 02:37 PM
Does this help:

janek68
08-04-2003, 04:56 PM
Thanks for your suggestion. My question is where do I put the code in my script. I want to click on the thumbnail and the larger image displays with its description. I have a collection of images that I want people to be able to click on to see the full size image. Thanks again.

David Harrison
08-04-2003, 05:27 PM
Well it's slightly different to what I posted but it does what you want (I think):

janek68
08-04-2003, 07:10 PM
Thanks for the help. This looks like what I was trying to do.

Thanks again

David Harrison
08-05-2003, 02:18 PM
Happy to help. :)