Page 1 of 1

Looking for a javascript.

Posted: Sun Feb 29, 2004 4:22 pm
by Coal
I'm looking for a javascript that will reload a different set of images with each page reload.

I'm making a music site for the local music scene. The best way to explain what I'm looking for is to give an example.

On one page load I would like:
Picture of singer of Band A
Picture of guitarist of Band A
Picture of Bassist of Band A
Picture of Drummer of Band A

And on another page load I would like:
Picture of singer/guitarist of Band B
Picture of Bassist of Band B
Picture of Drummer of Band B

And on yet another page load I would like:
Picture of singer of Band C
Picture of Lead Guitarist of Band C
Picture of Guitarist of Band C
Picture of Bassist of Band C
Picture of Drummer of Band C

And so on and so forth. I know this can be done in PHP but my server doesn't support PHP. Does anyone know of a script that can do this in Javascript?

Posted: Mon Mar 01, 2004 12:23 am
by scorphus
If the case of the same image to be loaded in two consequent reloads is not a problem then you can simply implement a random image selector algorithm.

If the image sequence matters then you better play with cookies.

You can find some examples on the forum.

Scorphus.

Posted: Mon Mar 01, 2004 8:34 pm
by Coal
Thanks anyway... but I found a way to get what I wanted.