[RESOLVED] random banner question

admin

Administrator
Staff member
Hello,

I found this script here. It is the closest script to what I am looking for, but doesn't quite do all I need it to do. I need the script to rotate banner images in 4 different locations on the screen. For instance, one main banner at the top of the page, then 3 smaller banners on the right side of the page. Each banner location will need to have it's own set of images to pull from. Each banner location should change at the same time on the same interval. I have tried changing the code around many different ways, but nothing I do seems to work. I would appreciate any help you can offer. Thank you.




<!-- TWO STEPS TO INSTALL BANNER ROTATER:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Markus Fischer (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->) -->
<!-- Web Site: <!-- m --><a class="postlink" href="http://josefine.ben.tuwien.ac.at/~mfischer/">http://josefine.ben.tuwien.ac.at/~mfischer/</a><!-- m --> -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <!-- m --><a class="postlink" href="http://javascript.internet.com">http://javascript.internet.com</a><!-- m --> -->

<!-- Begin
var mfBanners = [
['http://www.banner1-url-here.com', 'http://imageserv.imgis.com/images/Ad13700St1Sz1Sq1_Ban1.gif'],
['http://www.banner2-url-here.com', 'http://imageserv.imgis.com/images/Ad13189St1Sz1Sq5_Ban10.gif']
];
var mfIe = false;
if( document.all) {
mfIe = true;
}
var mfBannerIndex = 0;
function mfBannerChange() {
var htmlString = '<a target="_blank" href=http://www.webdeveloper.com/forum/archive/index.php/"'+mfBanners[mfBannerIndex][0]+'"> <img border="0" src=http://www.webdeveloper.com/forum/archive/index.php/"'+mfBanners[mfBannerIndex][1]+'"></a>';
if( mfIe) {
document.all.banner.innerHTML = htmlString;
}
else {
document.layers["banner"].document.open();
document.layers["banner"].document.write( htmlString);
document.layers["banner"].document.close();
}
if(mfBannerIndex < mfBanners.length - 1)
mfBannerIndex++;
else
mfBannerIndex = 0;
}
setInterval("mfBannerChange()", 5000);
// End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<div id="banner" style="position:absolute; top:300; left:171;"></div>


<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href=http://www.webdeveloper.com/forum/archive/index.php/"http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.74 KB -->
 
Top