PDA

View Full Version : Enlarged mouseover images don't show



mondealenvers
04-24-2010, 10:57 AM
1) Script Title: thumbnailviewer2.js

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

3) Describe problem: Thumbnails show up but source, enlarged images, which are not necessarily the same image as the thumbnail, don't show up, even though the images are there on the server. Here are a few sample docs:

http://www.katalinperry.com/papmar.html

http://www.katalinperry.com/painting_sculpture.html

What's gone haywire? THANK YOU THANK YOU for helping.

jscheuer1
04-24-2010, 12:35 PM
Your copy of thumbnailviewer2.js has been altered somehow, here:


var imageHTML='<img src="../../KPNEW/'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image
if (typeof dest!="undefined") //Hyperlink the enlarged image?
imageHTML='<a href="../../KPNEW/'+dest+'">'+imageHTML+'</a>'

It should be:


var imageHTML='<img src="'+imagepath+'" style="border-width: 0" />' //Construct HTML for enlarged image
if (typeof dest!="undefined") //Hyperlink the enlarged image?
imageHTML='<a href="'+dest+'">'+imageHTML+'</a>'

Either restore it or get a fresh copy from the demo page and use that.

mondealenvers
04-24-2010, 03:06 PM
THANK YOU. WOrks fine now. But how does the js get corrupted? I swear I haven't opened it. Perhaps linked to uploading? Just curious. THanks again.

jscheuer1
04-24-2010, 04:15 PM
I'm not really sure why this happens. I say this, because I saw it once before, not too long ago. Same script, similar change, just the added path:


../../KPNEW/

was different. The other person this happened to seemed to know why, but didn't go into any detail about it. In that case though I got the feeling that they had made the change for local testing purposes.

I do know that some WYSIWYG editors can change code. Something like this, inserting a path where the editor 'thinks' it's appropriate for some reason, is one of the things that happens sometimes.

Even if you don't actually open the file in the editor, if you use the editor to upload it, it may make the change.

If you use your host's online utility (if they have one) to upload and/or edit files, similar things can happen.

These tools are all supposed to make the design and publishing of web pages more intuitive and less technical. But it comes at a price - you don't always know what's happening with your files.

That's one of the reasons why I use a text only editor for editing code, preview it locally in the browser, and use a plain vanilla ftp program for uploading. That eliminates all sorts of annoying things that can otherwise happen.

If you know what ../../KPNEW/ is or was, it might help in understanding why this happened.

mondealenvers
04-24-2010, 04:30 PM
I've been using DW CS3 and sometimes the synching/date stamp on uploaded files seems wonky. I'll go back to using Fetch. Thanks again. I really enjoy learning all of this, the minimalness of the code with its ability to WOW. You have a great site and forum!