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 default.asp page they are immediately redirected to default1.asp.And when the next person comes to my default.asp homepage - they are immediately sent to default2.asp. And so on and so on.
Here is some javascript that allows me to load files randomly - but not sequentially.
<!-- Begin
var howMany = 1; // max number of items listed below
var page = new Array(howMany+1);
page[0]="default3.asp";
page[1]="default2.asp";
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];
window.location=(quox);
// End -->
Any ideas anyone?
cheers
Mark
mark_overmars2002@yahoo.com.au