Forum Moderators: open

Message Too Old, No Replies

Looking for "slideshow"

         

pmshaw

10:55 pm on Jan 30, 2003 (gmt 0)



I am trying to find code for a slideshow, ie when one mouses over a thumbnail, a larger version of the pic is shown. The area where the larger image is shown remains the same. In other words, as you mouse over each thumb, the larger image is replaced.

Sorry not more clear. You can see why I've had a difficult time finding something like this using search engines.

Thanks, pmshaw

DrDoc

11:07 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World, pmshaw!

Well, this has to be done with JavaScript.
Example:

<script type="text/javascript">
var img=new Array(2)
img[0]=new Image;
img[1]=new Image;
// This is just a blank "place holder" gif ..
img[0].src="images/blank.gif";
// This displays a nice little message like
// "Image loading. Please wait ..." or
// something like that
img[1].src="images/wait.gif";
function over(which) {
document.getElementById('fullsize').src=img[1].src;
document.getElementById('fullsize').src="images/fullsize"+which+".jpg";
}
function out(which) {
document.getElementById('fullsize').src=img[0].src;
}
</script>

Somewhere on the page, place the placeholder gif, which should be the same size as the other images are (assuming they are the same size). Giv the image an ID, for example

id="fullsize"

Make sure the thumbnails are linked using the anchor tag. In each tag you place the following code:

onmouseover="over(#)" onmouseout="out(#)"

... where # is the number of the image (give them all unique numbers, perferably starting with 1). The fullsize images should be named something like "fullsize1.jpg" .. where the number is the same as in the links mentioned above.

austtr

11:14 pm on Jan 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



pmshaw...

I'm not exactly sure what yoyu are after but have you tried the dynamicdrive site....(url of same name)

Quite a few different slideshows scripts available there.

tbear

1:44 am on Jan 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi pmshaw,
I think you'll find them called 'mouseovers', since that's what causes the effect and a few others too, don't get too carried away ;)