Refresh Banner After Every Webpage Visit

Post new topic   Reply to topic

View previous topic View next topic Go down

Refresh Banner After Every Webpage Visit

Post by Marc on Fri Oct 16, 2009 7:20 pm

This script will allow you to refresh a new banner after every web page visit.

Code:
<script language="javascript">

<!-- Begin
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="WEBSITE URL";
alt="iWebBuddy.com ALT TEXT";
banner="URL OF IMAGE";
width="100";
height="100";
}
if (ad==2) {
url="WEBSITE URL";
alt="iWebBuddy.com ALT TEXT";
banner="URL OF IMAGE";
width="100";
height="100";
}
if (ad==3) {
url="WEBSITE URL";
alt="iWebBuddy.com ALT TEXT";
banner="URL OF IMAGE";
width="100";
height="100";
}
document.write('<right>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0></a><br/>');
document.write('</right>');
// End -->
</script>


You can find and modify the following :

1. Add an image :
banner="URL OF IMAGE";


2. Add a url to the banner :
banner="URL OF IMAGE";


3. Add ALT Text to banner :
alt="iWebBuddy.com ALT TEXT";


4. Adjust size of banner :
width="100";
height="100";


Enjoy now, Very Happy


Last edited by Marc on Sun Dec 06, 2009 3:55 pm; edited 1 time in total (Reason for editing : made the tutorial simple to edit)

Marc
Administrator
Administrator

Posts: 321
iCoins: 643

View user profile http://www.iwebbuddy.com

Back to top Go down

Re: Refresh Banner After Every Webpage Visit

Post by Marc on Sun Dec 06, 2009 3:56 pm

This tutorial has been edited to help others understand the script better, Wink


If you posted 15 times or more, then you can use your forum's signature like me, Wink
If your having problems with your signature, please private message me.

Marc
Administrator
Administrator

Posts: 321
iCoins: 643

View user profile http://www.iwebbuddy.com

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum