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-1' border='0' height='60px' width='468px' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
MAKE THE FOLLOWING CHANGES:-
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! :>
No comments:
Post a Comment