View Full Version : Thumbnails not loading image in loadarea

01-08-2012, 12:07 AM
1) Script Title: ImageThumbnailViewerII

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

3) Describe problem: Thumbnails not loading image in loadarea

I had this working just find moments ago, and then making several changes in haste I must have messed something up because now it's suddenly not working. For some reason now, the three thumbnails on this linked page are not loading the images into the loadarea. Does anyone have any idea why?

Broken Proxy Link Removed

Thanks so much in advance of any help ~ this is driving me insane tonight and I already have a kicking migraine from the silly computer screen. Darn deadlines. :o :mad: :)

01-08-2012, 12:40 AM
Your copy of thumbnailviewer2.js has been edited or has become corrupt. This line, perhaps others, has been altered (alteration red):

var imghtml='<img src="rkg/'+$anchor.attr('href')+'" style="border-width:0" />'

As a result, the browser is looking for the larger images in the wrong location.

Get a fresh copy of thumbnailviewer2.js from the demo page and use that.

01-08-2012, 12:56 AM
Thanks John as always for such a swift reply.

I wonder, do you think i posted the correct link to the correct page where i originally got the script from. It's possible i got it wrong. the demos on the DD page i mentioned in my original post, doesn't seem to have a 'loadarea' image..

Just wanted your thoughts on this before i move forward...

01-08-2012, 03:02 AM
Of course it does, from the code box for Step 2 on the demo page you linked to:

<div id="loadarea" style="width: 600px"></div>

And the image is dynamically inserted there when a trigger is activated. You can, as you've done, optionally hard code an image in there so the user has something to look at before they activate a trigger. But that doesn't change the the fact that you're using thumbnailviewer2.js script and the fact that it has been altered. Sometimes your editing program or ftp program will do this automatically. I'm not sure why, but lots of programs 'think' they're smarter than you are, so they change the code without telling you. Or you might have done it yourself for some reason while testing and forgotten to change it back for production.

But this has happened quite a number of times with this specific script, so many times in fact that I'm pretty sure it's something a program you're using did automatically for some reason.

01-10-2012, 04:47 PM
Thanks so much for your time and help wit this! :)