View Full Version : thumbnailviewer.js

11-26-2009, 06:08 PM
1) Script Title: thumbnailviewer.js

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

3) Describe problem: I am using the script to show 6 large images from 6 thumbnails, however would like to show the 1st large image automatically on page load.

What code changes are required to achieve this and where/which page do I need to edit?

11-26-2009, 06:29 PM
Where you have this or something like it:

<div id="loadarea" style="width: 500px">
This DIV will show my enlarged images!

Just put in the image you want, ex:

<div id="loadarea" style="width: 500px">
<img src="whatever.jpg" alt="">

You may even include a description if you like/have one for that image:

<div id="loadarea" style="width: 500px">
<img src="whatever.jpg" alt=""><br>
Some descriptive text for the image

In fact, you may place any ordinary valid HTML code in there that you like. It will be overwritten once a thumbnail is activated.

11-26-2009, 06:44 PM
John, that must be the fastest response time I've ever had from a forum question. Thank you so much.

And best of all it works a treat!!

Example is here:Disabled Holidays (http://www.thedisableddirectory.com/hp-947-coedllys-country-house.aspx)

11-26-2009, 07:03 PM
You've got an error on the page. Wherever you have:


which is in several places, since setcolorpicidx is not defined, it throws an error when the mouse moves over these images that have that associated with them. Most browsers ignore this, only reporting it if you look at their console. But in IE, you get the dreaded yellow triangle in the status bar and it stops the thumbnail script from working. So either define that function, or remove those onmouseover calls.

11-26-2009, 07:12 PM
Thanks John

I'm not at all familiar with javascript, so removed the calls as per your suggestion.

Once again, many thanks.