PDA

View Full Version : Image Thumbnail Viewer combined with Conveyor Belt slideshow



atsoum
02-07-2007, 11:17 PM
1) Script Title:
Image Thumbnail Viewer
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm
3) Describe problem:
I would like to combine this script with this:
Conveyor Belt slideshow script
http://dynamicdrive.com/dynamicindex14/leftrightslide.htm

In IE everything works fine, but in Firefox I have a problem, when I click an image of the slideshow then The Image Thumbnail Viewer effect doesn't work and simply it open's the image in a new page.
But if I insert a simple image in the same page where there is a Conveyor Belt slideshow script, then for this image only the Image Tumbnail Viewer script works fine.

I suppose that the problem has to do with syntax. The above line is a part of the Conveyor Belt slideshow script, where I had embedded the Image Thumbnail Viewer script.

leftrightslide[0]='<a href="1_Small.jpg" rel="thumbnail"><img src ="1_Small.jpg" border=1></a>'

Is there something particular I have to notice about the attribute rel="thumbnail" in Firefox?

Any help?

jscheuer1
02-08-2007, 05:45 AM
It probably has to do with the order in which onload events are being carried out but, it may be something else. I'd try this -

Remove the following from the Conveyor script:


window.onload=fillup

Add the following (red) near the end of thumbnailviewer.js:


thumbnailviewer.dotask(window, function(){fillup()}, "load") //Initialize Conveyor script on page load
thumbnailviewer.createthumbBox() //Output HTML for the image thumbnail viewer
thumbnailviewer.dotask(window, function(){thumbnailviewer.init()}, "load") //Initialize script on page load
thumbnailviewer.dotask(window, function(){thumbnailviewer.cleanup()}, "unload")

If that doesn't take care of it, please supply a link to your problem page.

atsoum
02-08-2007, 09:41 AM
Thank you for your reply.

You are right, I did this modifications and now everything is ok in Firefox, but I can't believe that now I have problem in IE:o :(

Anyway to combine both techniques?

Here is a link to the page:

http://www.mechanocraft.eu/SlideShow.html

Thank you in advance!

jscheuer1
02-08-2007, 10:42 AM
This seems to do the trick:


thumbnailviewer.createthumbBox() //Output HTML for the image thumbnail viewer
thumbnailviewer.dotask(window, function(){thumbnailviewer.init()}, "load") //Initialize script on page load
thumbnailviewer.dotask(window, function(){fillup()}, "load") //Initialize Conveyor script on page load
thumbnailviewer.dotask(window, function(){thumbnailviewer.init()}, "load") //Initialize script on page load
thumbnailviewer.dotask(window, function(){thumbnailviewer.cleanup()}, "unload")


It shouldn't but, I'm not going to worry about that unless it causes other problems.

atsoum
02-09-2007, 10:16 AM
Thank you for your help, it works fine!!

crayfiss
02-23-2008, 06:13 PM
Hi, I'm trying to do the same on combining the two scripts functionality but with Image Thumbnail Viewer2.

I have tried the suggested fix on the onload events but to no success. can someone point me to the right direction?
Thanks


Cray

jscheuer1
02-23-2008, 06:28 PM
Hi, I'm trying to do the same on combining the two scripts functionality but with Image Thumbnail Viewer2.

I have tried the suggested fix on the onload events but to no success. can someone point me to the right direction?
Thanks


Cray

Please start a new thread, include links to the scripts you are using (to their demo pages here on DD) and a link to your page.