How To Create Random 468x60 AD Banners Widget?

random1 After having shared 125 by 125 Random Ad Banners Widget For Blogger I hope you will love learning how to create Random 468 by 60 AD Banner widget for your websites.  468x60 Banners are as widely used as 125x125 banners. They are displayed often at the upper part portion of web blogs or other websites. I have kept the coding simple and editable. The banners will change randomly upon each page load or page refresh.  Kindly view a demo first.


Live Demo


Add a Random Banner Widget To Your Blogger Blogs

To do this simply add the following code in your HTML/JavaScript Widget,

<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' alt='AD DESCRIPTION'></a>";

images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='60px' width='468px' alt='AD DESCRIPTION'></a>";

images[2] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-3' border='0' height='60px' width='468px' alt='AD DESCRIPTION'></a>";

index = Math.floor(Math.random() * images.length);



1.  Replace URL OF ADVERTISER with the website link of the advertiser

2.  Replace URL OF BANNER’S IMAGE-1  and URL OF BANNER’S IMAGE-2 and URL OF BANNER’S IMAGE-3 with the Image links of the Advertiser’s banners

3.  Replace AD DESCRIPTION with some information related to the Ad. The description appears on mouse hover. You can leave it blank if you wish.

That’s it!

Apply it and save your widget to make the magic code work in action! :>

Need Quick Help within 24 Hours? ASK NOW

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »

52 comments : Post Yours! Read Comment Policy ▼
We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.

  1. Cool! Thanks for the tip Mohammad

    1. Evolution Professional Equipment
      Wholesale Boxing and Martial arts Supplies with Custom Imprints of your own logo or Brand Name.

  2. Nice Mustafa :)


  3. When I put it into a HTML/Javascript gadget to be put in the top right of the header, it appears in the top left, and pushes site title down. Any idea of how I can fix this? Thanks in advance!

  4. @Ayush
    Thanks :)

    you welcome! :>

    Kindly send me the url of your blog where you want to add this plus the screenshot of your layout(Design page) I guess your widget section has less width than required.

  5. FYI, blog is FAR from finished.


    Any suggestions on design? I'm trying to make it look clean and professional. I'm think I'm going to create the design in Photoshop so it's unique and looks exactly how I want it. Thanks a lot!

  6. I got it mustafa... :)


  7. thanks Mohammad , can u make a post on how to get approved by adsense, which is right time to request google to approve by website ,are there any other add providers better than google adsense

  8. @stuart
    Buddy you need to create a separate widget section to the right of your sidebar first. Like this one,
    You will have to divide your header into two. You can find tutorials on it online on how to do it.

    Excellent! :>

    I surely will write on them. Its the damn exams which is eating all my time. :(

  9. thanks for Ur reply mohammad , and best of luck for Ur exams

    " what exactly are u studying BE engineering "

  10. Mohd

    Can you post some articles related to blogger pages
    1. How should we post in the blogger pages ( same with blogger editor?). I have heard that using the date before the 1st post in blog can tackle this?
    2. In blogger pages i dont want any sidebar content, is that possible?
    3. I dont want the subscribers to get unnecessary notification about the pages, is that possible?
    I am in the process of creating some horizontal navigation menu, so can you post some articles mohd. It will be of great help

    Thanks and Regards

  11. Hey Mohammad, your home buddy Rafay is scraping contents from many other sites and I've noticed it many times. Please warn him.

  12. @Ayush
    Do u mean exactly copy pasting?

  13. @Ayush
    First of all I don't copy contents from any blogs, And honestly I don't really care if you think it the other way. It's up to you...

  14. @john
    I am pursuing a degree in Computer Engineering pal. :>

    Always welcomed.

    Dear Blogger pages can be used as static pages only. They are best for your table of contents, About me page, contact Me, info etc. They can not be best used to serve for other purposes. I will still look around for new ways of using them.

    For navigation menus kindly read this post -> 30+ “Horizontal” Navigation Menus For Blogger With CSS & HTML Codes


    I am afraid buddy I am not answerable to that pal. Further I know rafay is a talented guy and if you consult him via his blog then he will surely clearify if anything appears conflicting. :>


    We are bound to respect views brother even if they appear difficult to hear. I hope you understand :>

  15. Great! I just happened to come across your blog. I appreciate your approach on this issue. I have added you to my favorites! Thanks a lot!

  16. Hi this one is great and is really a good post. and also good content of the information Very well written I appreciate & must say good job..

    register domain name india

  17. sir Good afternoon.I have question regarding my adsense ad.Why my adsense ad disappear after I putting the code of 468x 60 random ads of my one site need your help sir...How I troubleshoot this

  18. Assalam-o-Alikum Sir I Visit Ur Blog... Really I AM Very Happy To Know About Ur Popularity.. In Bloggers.. Can U Please Also Help me in This Field...???

  19. Thank you Mustafa....this is so powerful..ang users friendly.

  20. nice post about create random banner on blogger, i like your post. i have not tested this trick yet, but i will try it in mean time.

    Thank you for helping to all bloggers.

  21. I know a good Advertising website ! and also know a website keyword about related PVC Banners.

  22. This is a good banner related website ! I have seen this website.

  23. To the author: thanks for the code. It works!

    Question: is there any way to program the banner to always change to a different one when the page is refreshed? The way it is now, which is 100% random, it is possible for the same banner to appear once, twice, or even 3 times in a row.

    Thanks again!

  24. ASsalmmjualaikumWarohmatullah ... Mohammad ..

    im was make create random "468x60 ad banner" and put it code in HTML Widget after that i save but i dont see anything my banner ..

    hermmm ...i hope you can help me ..

    Thanks ...

  25. Ok Mohammad ...You See My making this add like this are right? .. You think in your mind ok ..

    i making "URL OF ADVERTISER" with my URL WEBSITE Only ..
    are right my make this URL?..

    i making "URL OF BANNER’S IMAGE-1" with URL From Google search images ..

    are right my method ?..

    i making "AD DESCRIPTION" with my speech add ..

    are right my method ?..

    Hope you help me ...because im love to make add in my society & private blog to beautiful also pro look.

    Thanks Mohammad ..

  26. i want make this banner to sidebar blog but after i save code in HTML Widget in dashboard layout ...i dont see anything add i make when i refresh blog ..

    huh ... its very tired for me now ..

    hope you help me ...

    Thanks Mohammad ..

  27. W/salam brother,

    You may not link images from Google image search instead you may save it in blogger and then get the URL from there. Read this tutorial:Backup images in blogger

    It will work just fine then! :)

  28. Professional post on Creating Random 468x60 AD Banners Widget..I am really impressed on the great coming on this amazing principle. Thanks for taking your time to discuss it with us.
    Hosting a website in india

  29. Post is very cool but i don't have any advertisment.Mashable Tricks

  30. This comment has been removed by the author.

  31. Hellow, great work man, i use this nifty script on my blog and works great will all banner sizes (728, 160, 338, 300 ...)
    Great and than !
    Watch Online TV Gratis !

  32. This comment has been removed by the author.

  33. Thank you very much..serves the purpose on our site. Look at the top right or right side bar on Social Crunching

  34. Very good....but my but it doesn't work on my blog, so i have to make another can see here -

  35. Thank you for the code, it works well in my blog <b><a href="" target="_blank">Simple Bizzz</a>&nbsp;. </b>I learnt many from your posts, thanks again

  36. IS verry beautifull blogg with cool and best article....
    if you want to watch online movies....

  37. thanks a lot for helping me master,you're the best

  38. good, it is fun and so beautifully made ​​random ..

  39. Really Very Useful Post.. i'm apreciate with u..
    now days many scam sites are developed.. its hard to find which is legal site and which really pays us..banners broker review

  40. Thank you so much, i feel free now and something i want to say to you....


  41. <div class="separator" style="clear: both; text-align: center;">
    <a href="" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="112" src="" width="200" /></a></div>

  42. Banner design widgets are really very important. Customization of random ad banners are vaery helpful and this article helps in learning to create random ad banners. I like it.

  43. Hello Dear! your ad Code can,t open ad in new window! kindly update your code, i want to open my ad in new window! thanks in Advance!

  44. This comment has been removed by the author.

  45. can i use this to random show the widgets?