Single Animated Image; Multiple URLs
I like what I've read so far, hoping for solutions! I have a pop-up ad that I want to share with three advertisers. My solution to this is an animated .gif. However, I want each image to link to a different part of my website. Can this be done?
Please, please, please let me get what I want.
I think this is what you are looking for...
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
//Set up images
img1 = new Image()
img1 = "one.gif"; // same as image in the <span>
img2 = new Image()
img2 = "two.gif";
img3 = new Image()
img3 = "three.gif";
//Number of seconds before images rotate
seconds = "2";
document.getElementById("mypics").innerHTML = '<a href="http://www.w3c.org"><img src="'+img1+'" name="myimg" border=0></a>';
setTimeout("imgTwo()", seconds * 1000);
document.getElementById("mypics").innerHTML = '<a href="http://www.netscape.com"><img src="'+img2+'" name="myimg" border=0></a>';
setTimeout("imgThree()", seconds * 1000);
document.getElementById("mypics").innerHTML = '<a href="http://www.google.com"><img src="'+img3+'" name="myimg" border=0></a>';
setTimeout("imgOne()", seconds * 1000);
<span id="mypics"><a href="http://www.w3c.org"><img src="one.gif" name="myimg" border=0></a></span>
Thanks for the reply, but I found a script the day you responded the first time. Guess I just hadn't looked long enough.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)