Rotating Banners Ad Clickable Script

This is a hot topic for all bloggers, everyone is looking for the code / script to put Rotating Banners on their blog, normally the Header, Footer or Sidebar!

The great news is that I have that script for you, this way you can promote different affiliate programs or products wihtout having to fill up your entire blog with annoying ads, just one space will take care of all the advertising with Rotating Banner or text ad.

<script type="text/javascript">
var imgs1 = new Array("","","","","","");
var lnks1 = new Array("","","","","","");
var alt1 = new Array("iLoveHits","tw","easyhits","ct","CA","zubie");
var currentAd1 = 0;
var imgCt1 = 6;
function cycle1() {
if (currentAd1 == imgCt1) {
currentAd1 = 0;
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
<a href="""" id="adLink1" target="_top">
<img src="" id="adBanner1" border="0" width="150" height="150"></a>

Now this is the 150×150 rotating banners that you can see on my sidebar, this is specially for 150×150 banners and smaller if you wish a script for bigger banners like 468×60 just leave a coment and I will get it for you.

To get this Script working with your own images and links you need to edit few things :

var imgs1 – defines the images url, edit each url with your own banner image url

var lnks1 – defines the link the banner will redirect to when clicked

var imgCt1 – defines the number of banner you want rotating

window.setInterval – defines the rotating time, 1,000 = 1 second

If you have any questions leave a comment, if you like this post please follow my blog.

Kind Regards

Dirson E. Jimenez Santana (strosdegoz)

19 thoughts on “Rotating Banners Ad Clickable Script

  1. sir yes i want banners like 468×60 thanks you so much for this wonderful tutorial

    • Here is the code for 5 banners ads size 468×60
      They will refresh every 6 seconds and open in a new window when clicked.
      The code must be copied exactly as shown and edit all the links and images with yours!!
      The last part at the bottom is needed for the script to work correctly, if you do as instructed
      you should have any problems, Regards

  2. sir how can i put up 10 banners there? and randomly appear?

    anyway thank you so much for your fast reply sir!

  3. about this code what is the purpose of this sir?

    You may use these HTML tags and attributes:


  4. Blogs On Blogger Directory says:

    That’s A Great Code Brother, Been looking for such code to add to my Blogger Blogs Directory found here.

  5. Hi, Strosdegoz.

    Thanks a lot for this wonderful script. It is excellent and working on my site.
    Love it so much.

    Good work!


  6. Great Code. I have it working great on my blog but I want to put multiple banners on my page. When I copy the code to a new gadget and change the images, etc. It combines them into one instead of having two separate banners. How can I put two different banners on my page?

  7. Here is the page I am working on
    I just put identical ones on there to show you what is happening. They should rotate through 3 images. The second one never changes and the first one only changes once. If I delete one of them they work perfectly.
    Thanks for your help

  8. hi,
    great scipt, thnaks. i was looking for something like this for a long time.
    one q, don’t mean to be unfair but, is there a way not to show “i love hits banner”?