If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > Simple sequential file script needed - HELP!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-04, 04:41
markovermars markovermars is offline
Registered User
 
Join Date: Jan 2004
Posts: 5
Simple sequential file script needed - HELP!

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
Reply With Quote
  #2 (permalink)  
Old 05-05-04, 11:16
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
Try here

http://www.dbforums.com/f192

Or

http://www.dbforums.com/f193

This is a place of disconnected ramblings...

Come join us....

http://www.dbforums.com/showthread.p...33#post3672433
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On