PDA

View Full Version : Image Thumbnail Viewer Help



asheypoo
11-24-2010, 02:13 PM
1) Script Title: Image Thumbnail Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm and http://www.dynamicdrive.com/forums/showthread.php?t=40219&highlight=thumbnail+viewer+update

3) Describe problem: We really want to continue using this script, but we do not like how you can see the "Close X" div and loading text before the page loads...Most of the time it is quick and hard to see, but it is visible. Is there a way to hide that div during page load? I have also applied the 2009 update. Thanks!

asheypoo
11-24-2010, 03:15 PM
I have placed the script tag in the footer of my body and now it is just white instead of the div...this works for now, but still wondering if there is a way to hide it in the script...

jscheuer1
11-24-2010, 04:05 PM
I'd try (from the updated thumbnailviewer.js file, additions highlighted):


createthumbBox : function(){ // write out HTML for Image Thumbnail Viewer plus loading div
document.write('<div id="thumbBox" style="visibility: hidden;" onClick="thumbnailviewer.closeit()"><div id="thumbImage"></div>' + this.definefooter + '</div>')
document.write('<div id="thumbLoading" style="visibility: hidden;">' + this.defineLoading + '</div>')
this.thumbBox = document.getElementById('thumbBox');
this.thumbImage = document.getElementById('thumbImage'); //Reference div that holds the shown image
this.thumbLoading = document.getElementById('thumbLoading'); //Reference "loading" div that will be shown while image is fetched
this.standardbody = (document.compatMode == 'CSS1Compat')? document.documentElement : document.body; //create reference to common "body" across doctypes
},

But that might cause problems and/or leave some issues unsolved.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

asheypoo
11-24-2010, 04:57 PM
Thanks for the really quick response...It seems to be working right now, but I will let you know if anything comes up! Thanks so much!