Animated gifs - clicking on to expand each individual frame?

Soldato
Joined
20 Oct 2002
Posts
3,923
Location
London
I plan to make a couple of animated gifs for a website i'm doing. They will comprise of about 5 images and will be on an endless loop of about 10 seconds per image.

My question is - is it possible to have the user be able to click on each picture that comes up and have that individual picture open enlarged in a new window?

Just html at the moment btw. Using fireworks for the gif.

Many thanks
 
thanks, had a look and managed to get it working.

But, would you mind taking a quick look at this code and telling me how to get the clicked pictures to open in the new window? Thanks again.




<a href="javascript:gotherewithurls();"><img name="thephoto" src="mm_restaurant_image.jpg" width="270" height="200" border=0></a>

<script language="javascript">
<!--
var photolist = new Array (
'el1.jpg','el1.jpg',
'food.jpg','food.jpg',
'function08.jpg','function08.jpg' //NO COMMA ON THE LAST ONE PLEASE
)
var numofphotos=(photolist.length/2);
var currentphoto=0;
var i=0;
var howfast=3*1000; //time in milliseconds (however many seconds * 1000)

function swapthephotowithurls()
{

if (document.images)
{
if ((currentphoto/2)<numofphotos-1) currentphoto+=2;
else currentphoto=0;
document.thephoto.src=photolist[currentphoto];
setTimeout('swapthephotowithurls()',howfast);
}
}

function gotherewithurls()
{

document.location=photolist[currentphoto+1];
}
setTimeout('swapthephotowithurls()',howfast)
// -->
</script>
 
Back
Top Bottom