Search This Blog

Tuesday, June 2, 2009

Rotating Ad Banner for Blogger

Rotating Ad Banner Javascript is here for you friends where you can use javascript to show various Ad banners on same space by rotating it in timely banner. It will be very helpful for those who sometimes feel short of space to show there advertisers.As this is very helpful to show off different ads in timely manner .

How It Looks..

Here is the javascript below which is very easy to use:-

Just copy the codes from below and paste to your

As usual ..LAYOUT > ADD PAGE ELEMENT > HTML/JAVASCRIPT


<script type="text/javascript">
var imgs1 = new Array("http://your Image Link Here.gif","https://your Image link.gif","https://Image Link.gif","https://Image Link","http://image Link");
var lnks1 = new Array("http://www.linkworth.com/?a=15034","http://Clickable Link here","http://Clickable link","http://Clickable Link","http://Clickable Link");
var alt1 = new Array();
var currentAd1 = 0;
var imgCt1 = 5;
function cycle1() {
if (currentAd1 == imgCt1) {
currentAd1 = 0;
}
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
banner1.src=imgs1[currentAd1]
banner1.alt=alt1[currentAd1]
document.getElementById('adLink1').href=lnks1[currentAd1]
currentAd1++;
}
window.setInterval("cycle1()",9000);
</script>
<a id="adLink1" href="http://Your First  link" target="_blank">
<img id="adBanner1" border="0" width="125" src="youir Image Link here" height="125"/></a>


INSTALLATION

1) Links
are urls that your images direct to in Banner. So change them according to your images.
2) Links in 
green are the web address to images so modify them.
3) 
var imgCt1 = 5; in brown is 5 i.e total no of images you using so change it to how many images you are using.
4) window.setInterval("cycle1()",
9000); in orange is 9000 is the ime interval at which time the banner changes to adjust it according to your needs.
5) Height and width are 125 the size of default add you are using to start load.

Enjoy guys It's done

6 comments:

  1. hey widget blogger,

    lets share our website link in each other blog.
    hope it provide some way to achieve success.

    I will put your link on my blog.
    Please put my link on your blog and that is
    http://www.indian-administrative-services.blogspot.com

    Together difference can be made.

    ReplyDelete
  2. thanx a lot!
    after so many milleniums,i finally found the correct script for my blog! ^_^

    ReplyDelete
  3. Thank you, Thank you! This is awesome. Great work!

    ReplyDelete
  4. pas mal...merci pour les information tres utile

    ReplyDelete
  5. can share a sample ?

    I cant do it ... :(

    ReplyDelete