|
|
|
|
![]() ![]() |
Jan 4 2008, 10:46 PM
Post
#1
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 92 Joined: 1-January 08 Member No.: 55,554 |
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: 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://www.invisionplus.net/forums/uploads2/9/f/adminarea/post-13-1196815051.png", "http://www.invisionplus.net/forums/uploads2/9/f/adminarea/post-13-1196815013.png" ); 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 src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>'); //--> Thanks |
|
|
|
Jan 12 2008, 03:39 AM
Post
#2
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 76 Joined: 30-October 05 Member No.: 13,571 |
I've test this code, but it works very well in firefox....
Here's my codes: CODE <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 computer image = 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> |
|
|
|
Jan 12 2008, 03:43 AM
Post
#3
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 92 Joined: 1-January 08 Member No.: 55,554 |
ok i'm going to try it again. maybe it was just a one time mess up when i tested it.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 26th July 2008 - 06:39 AM |