Hello –
I downloaded the following banner swapper by Lee U. some time ago. I would like the banners to be able to link to a url. Is this possible? How?
Thanks for any help.
Nate
/* This script and many more are available free online at
The JavaScript Source :: [url]http://javascript.internet.com
Created by: Lee Underwood :: [url]http://javascript.internet.com/
var bannerImg = new Array();
// Enter the names of the images below
bannerImg[0]=”image_jss.gif”;
bannerImg[1]=”image_js.gif”;
bannerImg[2]=”image_wr.gif”;
var newBanner = 0;
var totalBan = bannerImg.length;
function cycleBan() {
newBanner++;
if (newBanner == totalBan) {
newBanner = 0;
}
document.banner.src=bannerImg[newBanner];
// set the time below for length of image display
// i.e., “4*1000″ is 4 seconds
setTimeout(“cycleBan()”, 4
}
window.onload=cycleBan;
<!– Paste this code into the HEAD section of your HTML document.
You may need to change the path of the file. –>
<script type=”text/javascript” src=”banner.js.js”></script>
<!– Paste this code into the BODY section of your HTML document –>
<img src=”image_jss.gif” name=”banner”>
<p><div align=”center”>
<font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br>
by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
</div><p>