PDA

View Full Version : Thumbnail Viewer II Pictures have gone when uploaded



Bob2000
01-24-2008, 01:16 PM
1) Script Title: Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

3) Describe problem: I think im using an older version of this script, but it works fine on the hard drive but when i up load it to web space the pictures will not change they stay blank and the forward and backward buttons no longer work.

I think it has something to do with the location of the files, do the images need to be in the same folder as the htm file ?

I have uploaded it to this address so you can see.

http://homepage.ntlworld.com/berty70/bob/themes/bond.htm

should I upgrade to the newer version of the script ?

I hope you can help.

Jas
01-25-2008, 03:45 AM
Two things to check:
1) Is the path correct?
2) Is the case correct?

The path is showing that the images should be located in http://homepage.ntlworld.com/berty70/bob/themes/images/gallery/ Is that where they are?
Second, website images are case sensitive, so images/myimage.jpg and Images/myImage.JPG are two different paths.

jscheuer1
01-25-2008, 04:50 AM
Looks like its the path, as Jas suggests, the images are in:


http://homepage.ntlworld.com/berty70/bob/images/gallery/

not:


http://homepage.ntlworld.com/berty70/bob/themes/images/gallery/

although the gal0.jpg seems to be missing altogether. There is a gal0.gif though. Change this:


//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["images/gallery/gal0.jpg", ""]
dynimages[1]=["images/gallery/gal1.jpg", ""]
dynimages[2]=["images/gallery/gal2.jpg", ""]
dynimages[3]=["images/gallery/gal3.jpg", ""]
dynimages[4]=["images/gallery/gal4.jpg", ""]
dynimages[5]=["images/gallery/gal5.jpg", ""]
dynimages[6]=["images/gallery/gal6.jpg", ""]

to:


//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
dynimages[0]=["../images/gallery/gal0.gif", ""]
dynimages[1]=["../images/gallery/gal1.jpg", ""]
dynimages[2]=["../images/gallery/gal2.jpg", ""]
dynimages[3]=["../images/gallery/gal3.jpg", ""]
dynimages[4]=["../images/gallery/gal4.jpg", ""]
dynimages[5]=["../images/gallery/gal5.jpg", ""]
dynimages[6]=["../images/gallery/gal6.jpg", ""]

The back and forth buttons look like they need some work too.

jscheuer1
01-25-2008, 05:01 AM
Ah yes, if using the ../ in the dynimages array, you need to modify this (addition red):


//Starting here is the modification that John made for me to allow forward and back buttons
function findLoaded(){
if(typeof document.getElementById('dynloadarea').getElementsByTagName('img')[0]!=='undefined'){
var theImg = document.getElementById('dynloadarea').getElementsByTagName('img')[0].src
for (var i_tem = 0; i_tem < dynimages.length; i_tem++)
if (theImg.indexOf(dynimages[i_tem][0].replace(/\.\.\//,''))>-1)
return i_tem
}
else
return -1
}

in order for the back and forth buttons to work right.

Bob2000
01-25-2008, 11:12 AM
You Guys 'ROCK' this worked fantastically and what a very quick response.

Thanks again.