PDA

View Full Version : Thumbnailviewer II - not working on first load



Slimane
10-22-2007, 11:34 PM
1) Script Title:
Image Thumbnail Viewer II

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

3) Describe problem:
The mouseover doesn't work when the pag eloads for the first time

Repro steps:
1. Go to http://www.sweetartsdesign.com.ws026.alentus.com/indexb.html
2. Click on Design Gallery | Original designs (on the left menu)
3. Mouse over any design

Observe:
No design displayed on the right.

Workaround:
4. Hit the back button on your browser
5. Go back to Design Gallery | Original designs
6. Mouse over any design

Observe:
It works.

WHY??

Thanks for your help.

Slimane
10-23-2007, 12:12 AM
Let me add this additional info:

The page where the gallery is located is in an Iframe. Right-click on that page to view the code on a blank area, but not on an image. I have a script that prevents right-clicking on the copyrighted designs.

Again, if you know a way to change the code slightly, let me know.

Thanks!

jscheuer1
10-23-2007, 05:18 AM
Now, I had no problem as long as I allowed the page to load before mousing over things. So you would want to speed loading.

Those no right click scripts are virtually useless. They only keep honest people honest. Getting rid of them would help loading time, I'm sure. Also, you should only have these:


<script type="text/javascript" src="designs/thumbnailviewer2.js" defer="defer">
</script>
<script language="JavaScript" src="rightclickimages/rightclick-images.js">
</script>

once on a page. And, as I said, you might as well get rid of the no right click one.

Optimizing your images and preloading them from the top page (before anyone gets to the gallery pages) would also help. Preloading won't help as much as you might think though. For preloading to work best, the images should be of as small a number of bytes as possible (via optimization). The one glitch in preloading is that you have so many images, it will take a bit of time to load them no matter where it is done or how small in bytes they are.

Slimane
10-23-2007, 03:54 PM
John -

Thanks for your reply.

I am still having issues. I cleared my cache and went back to that page. I let it sit for 10 minutes (I'm on a T1 connection) and it still doesn't work. Funny thing is, if I click on a design, it appears but wipes out the first DIV that contains the thumbs. So I go back to the menu and navigate to the gallery again, problem solved.

Now, I removed the duplicated lines of code as you mentioned, but this time it doesn't work at all - no large image ever displays. I have to put the duplicated lines of code back in for the viewer to work at all.

According to the script documentation and the javascript comments, the mouseover option preloads the large images (as opposed to the click option) but I don't see that at all. If it were the case, the mouseover option would kick the preload process into gear.

Any suggestion??

jscheuer1
10-23-2007, 04:42 PM
In what limited testing that I can do here, this seemed to work out pretty well:

1371

replaces:

designspagination.html

Slimane
10-23-2007, 05:27 PM
You did it!

I was placing the thumbnailviewer script declaration in the <head> part of my code. By placing it at the bottom of the page, as you suggested in your code sample, I got the viewer to work right away.

Thanks a bunch for your time. I'm glad to use this great script.