FrontPage Templates & Web Design - Your One Stop Resource Center!

FrontPage Templates & Web Design Web Design with FrontPage Templates
  FrontPage Universe Templates - Home FrontPage Universe Templates - About Us FrontPage Universe Templates - Contact Us FrontPage Universe Templates - Privacy Statement FrontPage Universe Templates - Terms of Service FrontPage Universe Templates - Search
Web Design Templates
Join Our FrontPage Newsletter  
 

 

Home
FrontPage Templates
Site Evaluation Tools
FrontPage Resources
Web Site Promotion
Web Hosting
Affiliate Programs
Internet Marketing
Web Software
SE Optimization
Web Design Tips & Tricks
ClickBank Portal
Privacy Policy
Links

 

 

Web Design Tips

FrontPage Universe Tips
 

Rotating Banners


Here is a great little script for rotating banners throughout your website. The code in the text box below can be copied and pasted into a simple text editor and saved, as is, as banner.js. Within this code you will notice that it is set up with three banners, each linked to a different url. You can have as many ads in this simple rotator as you wish, just add them following the same format as the ones shown. Also, ensure you change the var ad_count number from 3 to however many ads you have in the rotation.

 <script Language="JavaScript">
var ad_count = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % ad_count;
ad +=1;
if (ad==1) {
url="http://www.frontpagewebwizard.com/webtools/guestbook/index.php";
alt="The World's Best Guestbooks - Frontpagewebwizard.com";
banner="http://images.frontpagewebwizard.com/frontpagewebwizard/
images/affiliate/br5.gif";
width="468";
height="60";
}
if (ad==2) {
url="http://www.frontpagewebwizard.com/webtools/counter/index.php";
alt="The World's Best Counters - Frontpagewebwizard.com";
banner="http://images.frontpagewebwizard.com/frontpagewebwizard/
images/affiliate/br2.gif";
width="468";
height="60";
}
if (ad==3) {
url="http://www.frontpagewebwizard.com/webtools/forum/index.php";
alt="The World's Best Forums - Frontpagewebwizard.com";
banner="http://images.frontpagewebwizard.com/frontpagewebwizard/
images/affiliate/br8.gif";
width="468";
height="60";
}
document.write('<center>');
document.write('<a href="' + url + '" target="_blank">');
document.write('<img src="' + banner + '" width='+ width + ' height=' + height + ' alt="' + alt + '" border=0><br>');
document.write('</center>');
</script>

Below is the simple javascript include script that you would place on any of your webpages that you want the banners to appear. Once this script is on your pages, all you need to do is modify the banner.js file that you created above, and those changes will be automatically effective on every page that the include script is on.

<script language="JavaScript" src="banner.js"></script>


 


 

 

Join our FrontPage Universe Newsletter
Please Subscribe to our FrontPage Web Design Newsletter

 

 
 
 
 
 
 
 
 

 

Contact: info@frontpageuniverse.com
Copyright © 2003 (FrontPage Universe). All rights reserved.

Last Modified October 12, 2007