Jump to content
xisto Community
demonlord

Image Rotater need help

Recommended Posts

a while back i made this script and it worked great. i made it so that members off of some of mysites could use it to display the button images that i had that would link back to my site. and what a lot of the members were doing was using it with the marquee tag because they were linking to a lot of sites, and one of my members said that it would not work with the marquee tag in firefox. so i tested it and sure enough it would not work it would just site there. so i tryed to fix it but i could not find what was wrong with it, so i was hopeing that some one here could.

here is the code:

<!--var currentdate = 0;var core = 0;function initArray() {this.length = initArray.arguments.length;  for (var i = 0; i < this.length; i++) {  this[i] = initArray.arguments[i];  }}link = new initArray("http://darkzone3.net","http://adminarea.invisionplus.net");image = new initArray("http://
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/
= new initArray("Come Chat For Free At Dark Zone","Have an Invision Plus Board Join other who do here");var currentdate = new Date();var core = currentdate.getSeconds() % image.length;var ranlink = link[core];var ranimage = image[core];var rantext = text[core];document.write('<a href=\"' +ranlink+ '\" target=\"_blank\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');//-->

Thanks

Share this post


Link to post
Share on other sites

I've test this code, but it works very well in firefox....
Here's my codes:

<marquee><script LANGUAGE='JavaScript'><!--var currentdate = 0;var core = 0;function initArray() {this.length = initArray.arguments.length;  for (var i = 0; i < this.length; i++) {  this[i] = initArray.arguments[i];  }}link = new initArray("http://darkzone3.net","http://adminarea.invisionplus.net");//I replace your image to local image path in my computerimage = new initArray("desktop.jpg","desktop2.jpg");text = new initArray("Come Chat For Free At Dark Zone","Have an Invision Plus Board Join other who do here");var currentdate = new Date();var core = currentdate.getSeconds() % image.length;var ranlink  = link[core];var ranimage = image[core];var rantext  = text[core];document.write('<a href=\"' +ranlink+ '\" target=\"_blank\"><img width="50" height="25" src=\"'+ranimage+'\" border="1" alt=\"'+rantext+'\"></a>');//--></SCRIPT></marquee>

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

×
×
  • 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.