Lapinbleu
04-02-2006, 06:12 AM
I found a nice "Gallery viewer" script which does exactly what I want, putting thumbnails around a larger space, which then obediently displays the large image corresponding to the thumb clicked on. I have no difficulty changing the lay-out, sizes and number of thumbs, etc, but it only works properly when I put the images in the same folder as the page. With several pages, the folder will become large, and confusing, so I would prefer to pack the page's images in a sub-folder of their own, and call them from there.
Here's the code :
<HEAD>
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;}}
</HEAD>
Then;
<BODY>
<center>
<table width=360 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="javascript:doPic('p1.jpg');"><img src="p1.jpg" width=90 height=60 border=0></a></td>........etc, etc..........
</tr>
<tr>
<td colspan=4 align=center><img name="mainpic" src="p1.jpg" width=360 height=240 border=0></td>
</tr>
<tr>
<td><a href="javascript:doPic('p5.jpg');"><img src="p5.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p6.jpg................etc, etc....
If I put my images in an external folder (/images) they appear, but don't change any more..... How do I link them properly? This would be soooo useful to me. Thanks, Lapinbleu.
`(;o) This is me - I have a beret and a big nose...
Here's the code :
<HEAD>
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;}}
</HEAD>
Then;
<BODY>
<center>
<table width=360 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="javascript:doPic('p1.jpg');"><img src="p1.jpg" width=90 height=60 border=0></a></td>........etc, etc..........
</tr>
<tr>
<td colspan=4 align=center><img name="mainpic" src="p1.jpg" width=360 height=240 border=0></td>
</tr>
<tr>
<td><a href="javascript:doPic('p5.jpg');"><img src="p5.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p6.jpg................etc, etc....
If I put my images in an external folder (/images) they appear, but don't change any more..... How do I link them properly? This would be soooo useful to me. Thanks, Lapinbleu.
`(;o) This is me - I have a beret and a big nose...