Home » Blogger Tutorials, Tricks and Hacks » Adding Random Banner Widget

Welcome to our AllBlogTools.com v.3 new version, We are still in beta, please contact us to report an error.

|| View All Tutorials ||

Adding Random Banner Widget

Adding Random Banner Widget

1 Star2 Stars3 Stars4 Stars5 Stars

Report Error

1,320 views

Hardeep Asrani shows us a great way on how to promote your blog. It’s by adding a random banner widget to your Blogger.

Here’s how you can do it, simply follow these few simple steps:

  1. Go to Blogger > Layout > Add A Gadget > HTML/Javascript
  2. Paste the code below

<script language="JavaScript"> 
 images = new Array(3);
 images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-1' border='0'height='60px' width='468px' ></a>";
 images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0'height='60px' width='468px' ></a>";
 images[2] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-3' border='0'height='60px' width='468px' ></a>";
 index = Math.floor(Math.random() * images.length); 
 document.write(images[index]); 
 </script>

3. Just change URL OF ADVERTISER with your own links and URL OF BANNER’S IMAGE-1/2/3 with your images.
4. Customize your preferred height and width of images by changing  height=’60px’ width=’468px’
5. If you want to add more banners just modify the script.

Liked It ? Please Share

Related Tricks & Tutorials

Comments

4 Responses | Post A Comment | Subscribe To Comments RSS Feed

  1. sneha says:

    Hi! I am having a problem with my new blog, the gadget Blog Archive is not visible on the blog though it is there in the layout..Please help me…

  2. whoah this weblog is magnificent i really like reading
    your articles. Stay up the good work! You
    already know, a lot of people are searching round for this information, you
    can aid them greatly.

Comments will be closed off on this post 365 days (1 year) after it is published. Apologies to this, but it's all about avoiding a growing comment spam problem. See our most recent posts where you can comment here