[thelist] Javascript smartypants needed

tony tony at wildtribe.com.au
Wed May 5 20:28:00 CDT 2004

Hi there,

Can anyone help me with the following:
I need some javavscript or ASP code that simply allows me to redirect
someone who visits my homepage, to a number of sequential ASP files.
ie - when someone arrives at my homepage (default.asp) page they are
redirected to default1.asp.And then the next viewer that comes to my
homepage - is immediately sent to default2.asp. And so on and so on.

This also means that if someone comes to my homepage - looks around the site
and at some point returns to the homepage - he/she also sees a new homepage.

Here is some javascript that allows me to load files randomly - but this is
NOT what I need - I need files to load sequentially or by simply adding

<!-- Begin
var howMany = 1;  // max number of items listed below
var page = new Array(howMany+1);


function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
return randscript;
quo = rndnumber();
quox = page[quo];
// End -->

As as aside - is there any problem associated with having a script similar
to the above on my homepage and Search Engine Robots - I thought I may have
read somewhere in the distant haze that using redirects on a homepage may be
asking for trouble.

Any ideas anyone?


More information about the thelist mailing list