# random index page



## ckaas (Feb 3, 2003)

hello all, i was wondering how one sets up a website so that the index page is different everytime it loads? some sites like starwars.com use this, the index page is different everytime one reloads the page. how do one do this?  thanks


----------



## ckaas (Feb 3, 2003)

the server is NT 4.0, if that helps...


----------



## Memnoch1207 (Dec 27, 2002)

view the source code for the page...it's javascript.


----------



## ckaas (Feb 3, 2003)

yeah i notice the javascript, but could you point out at what point it determines what set of images are to be loaded, i'm a bit slow you see, for these things... thanks.


----------



## brendandonhu (Jul 8, 2002)

Its not a different page, just a random image Javascript.
Search at Javascriptsource.com theres like 2 dozen scripts for this.


----------



## Rockn (Jul 29, 2001)

Here's a quicky you can modify to suit your needs:


```

```
Copy and paste it into the body of any web page. If you want more random indexes just change the variable *4 so the script can tell what number of random numbers to select from.


----------



## ckaas (Feb 3, 2003)

thanks rockn, if i were to replace document.write by document.replace and specified another page, would that work also?


----------



## Rockn (Jul 29, 2001)

The replace function is meant to replace something in a string. Say there were commas in a text string that you wanted to replace with semi-colons document.replace('textstring, ",", ";")

Something like that.


----------



## ckaas (Feb 3, 2003)

okay, thanks for all the help!


----------

