PDA

View Full Version : thumbnail viewer 2 opens image on another page



wolfwoman
06-23-2007, 01:24 PM
Good morning everyone.

I am using thumbnail viewer with great success except for one issue. Once I uploaded all files to the net and it is taking a little time to load all images...even though I have the image set to rollover, when the thumbnail is clicked it is opening the allocated larger image in a separate page. Dont want this to happen. Only want it to appear in the load area once the thumbnail is rolled over only. any suggestions greatly appreciated.

Best wishes
Wolf Woman

www.dynamicdrive.com/thumbnailviewer.htm

jscheuer1
06-24-2007, 04:07 AM
It could be that your images are taking so long to load that the script hasn't initialized by the time you click on the link. Once the script initializes, it should return false for a click. This can be hard coded into the links so that before the script initializes they will return false. But, I have a problem helping you further - the link you supplied in your post to this script doesn't work so I'm not sure of the specific script you are using or the specifics involved in modifying your code. Please supply a link to the demo page of the script here on DD. Also, there could be other problems - a link to your problem page would help determine if there are other problems.

wolfwoman
06-24-2007, 12:45 PM
Thankyou for your prompt reply.

The correct link to the script is
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm.

I have decided the use flash on some pages as I have been unable to resolve this issue so any help will be appreciated. I agree that the issue is to do with the size of the images being loaded...but wondered if there was any way the click to another page could be initialised on load...seems that is the case.

The link to one of the pages still using this script is as follows :

http://www.thepinkdoor.co.uk/graphicdesign.htm

A link to a page changed to flash is as follows :

http://thepinkdoor.co.uk/illustration.htm


Many thanks for your assistance,
Wolf Woman

wolfwoman
06-24-2007, 12:52 PM
Moi encore,

I am in the process of changing the page given in the link above to a flash movie also. I will be keeping the thumbnail viewer on the following page...please note it is the thumbnails at the bottom of each central image that appears on rollover only.

http://www.thepinkdoor.co.uk/webdesign.htm

I appreciate your help.

Best Wishes
Wolf Woman

jscheuer1
06-24-2007, 03:59 PM
First off, you are in violation of the DD usage policy:

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

In other words use:


<script type="text/javascript" src="thumbnailviewer2.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

</script>

instead of:


<SCRIPT
src="thumbnailviewer2.js"
defer type=text/javascript>
</SCRIPT>

OK, now the problem is as I imagined. You have so many images and possibly other things on the page that there is a small amount of time (with broadband - a large amount of time with dial up) while the page is loading, before the script initializes, when clicking on the thumbnails will fire their links as ordinary links. Once the page loads, they behave as expected. Here is one of those links:


<a
href="images/web10.gif"
rev=loadarea4::
rel=enlargeimage::mouseover>

or, more simply and with proper quoting included:


<a href="images/web10.gif" rev="loadarea4::" rel="enlargeimage::mouseover">

Now, there is one other issue here with these links and I will get to that in a moment, but to stop them from firing before the page has loaded, make them like so:


<a href="images/web10.gif" onclick="return false;" rev="loadarea4::" rel="enlargeimage::mouseover">

The other issue is with the rev attribute. In the above I kept the value as you had it:


rev="loadarea4::"

This makes each large image a link to the top of the page. If you wanted to link to another page you could have used:


rev="loadarea4::some_page.htm"

But, if no linking of the larger image is desired, it should be:


rev="loadarea4"

wolfwoman
06-24-2007, 05:42 PM
Dear John,

Many thanks for your prompt assistance. It is now working without opening before loading in a separate window. The script code has been reinstated.

Best Wishes
Sharron