Jump to content
xisto Community
Sign in to follow this  
couture threat

Button Rotations!

Recommended Posts

You know when you refresh a page and an image changes? Well it's called a rotation.

Here's how to do it:

<script LANGUAGE="JavaScript"><!-- Begin
var how_many_ads = 2;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="http://forums.xisto.com/no_longer_exists/;;
alt="Domain Name";
banner="http://forums.xisto.com/no_longer_exists/;;
width="88";
height="31";
}
if (ad==2) {
url="http://forums.xisto.com/no_longer_exists/;;
alt="Domain Name";
banner="http://forums.xisto.com/no_longer_exists/;;
width="88";
height="31";
}


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>


var how_many_ads = 2; Change the number 2 to however many buttons you have.
if (ad==1) { That means that's button number one. If you have 2 buttons, It would say ' if (ad==2) { ' etc.
url="http://forums.xisto.com/no_longer_exists/;; change http://forums.xisto.com/no_longer_exists/ to the domain url of the button you are linking, so that if you click on the button, it'll link to its correct url.
alt="Domain Name"; If you hover over the button, it'll say whatever is in quotes. Change domain name.
banner="http://forums.xisto.com/no_longer_exists/;; change that link to the image url of the button.
width="88"; height="31"; This is just the width and height of all your buttons. Meaning all your buttons must be this size. You can change it to any number.



Easy as that! :rolleyes:

Claps for Kellie!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.