whats the code for ..., :) |
whats the code for ..., :) |
![]()
Post
#1
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 354 Joined: May 2007 Member No: 526,982 ![]() |
so you know on some sites they have these ads [other sites buttons] and when the page refreshes, theres a different button? what is the code for that? i found it once but i forgot where i found it :[
|
|
|
![]() |
![]()
Post
#2
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 1,237 Joined: May 2008 Member No: 648,123 ![]() |
there's also an older article about this on a list apart. it's written in PHP, so even if your visitors have javascript turned off, they'll still be able to see and click on the images. (that's assuming of course, you have PHP installed on your server.)
|
|
|
![]()
Post
#3
|
|
![]() Irrisistable Cabbages. ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 549 Joined: Nov 2007 Member No: 589,355 ![]() |
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="URL HERE"; alt="Alt Text"; banner="BANNER URL HERE"; width="88"; height="34"; } if (ad==2) { url="URL HERE"; alt="Alt Text"; banner="BANNER URL HERE"; width="88"; height="34"; } if (ad==3) { url="URL HERE"; alt="Alt Text"; banner="BANNER URL HERE"; width="88"; height="34"; } if (ad==4) { url="URL HERE"; alt="Alt Text"; banner="BANNER URL HERE"; width="88"; height="34"; } 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>'); // End --> </SCRIPT> |
|
|
![]() ![]() |