Closed Thread Icon

Topic awaiting preservation: Sig Rotator...will this work?? Pages that link to <a href="https://ozoneasylum.com/backlink?for=7973" title="Pages that link to Topic awaiting preservation: Sig Rotator...will this work??" rel="nofollow" >Topic awaiting preservation: Sig Rotator...will this work??\

 
Author Thread
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-07-2001 17:06

Can I use something like this for a sig rotator here? I was trying to make my own so I don't have to leach off of everyone all the time

Maybe instead of the document.write at the bottom I could call the *.js script from my server. Not really sure. Thanks for any help.

code:
var currentdate = 0;
var loc = 0;

function imageArray() {

this.length = imageArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = imageArray.arguments[i];
}
}

image = new imageArray(
"http://www.electricanvil.com/c_prompt/images/image1.gif",
"http://www.electricanvil.com/c_prompt/images/image2.gif",
"http://www.electricanvil.com/c_prompt/images/image3.gif"
);


var currentdate = new Date();
var loc = currentdate.getSeconds() % image.length;
var randomImage = image[loc];

document.write('<a href="http://www.electricanvil.com/c_prompt/"><img src=\"'+randomImage+'\" border="0" alt="C:\"></a>');



C:\

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 12-07-2001 20:12

CPrompt, I think you can only do a sig rotator for this forum by using server side scripting. If you were loading a random image on one of your own web pages, you could use javascript to do it. You can't have the server this forum is hosted on call your javascript.

So you should probably consider perl or php to make one.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-07-2001 21:40

Thanks. I'll use it for something down the road I'm sure. Thanks again

C:\

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 12-10-2001 10:27

C:\, just for picking random image, simply use such:

var randomImage = image[Math.ceil(Math.random()* image.length)]

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-10-2001 13:12

lallous:

thanks. I like your code better. I was just trying to come up with a sig rotator for forums. Stupid me was going to try to use JavaScript. I don't know perl and am just now working on PHP, so...

Thanks for the example on this and the .onload() from the other thread. I am going to put them both to use.



C:\

« BackwardsOnwards »

Show Forum Drop Down Menu