Debt Consolidation - Debt Consolidation - Debt Consolidation - Manga - Debt Consolidation

PDA

View Full Version : How to redirect to a page based on system date?


anusha
Apr 9th 2006, 1:09 am
I am looking for a script that would allow me to redirect to a particular page based on user's system date.

Here is an example..

Say I have a site.. xyz.com and abt 365 pages, which would cover the whole year..

If a person visits xyz.com on say April 20th, I want the index page to redirect to the page corresponding to April 20th.

~ Anu

anusha
Apr 9th 2006, 1:21 am
For redirection based on day of the week, teh following works,...

<script language="JavaScript"><!--
function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i] = makeArray.arguments[i]; }

var daysArray = new makeArray('sunday','monday','tuesday','wednesday','thursday','friday','saturday');

var today = new Date(); // get todays date
var dotw = today.getDay(); // get the day of the week
// Sunday = 0, Monday = 1 ... Saturday = 6

location.href = daysArray[dotw] + '.htm';
//--></script>

profs77
Apr 10th 2006, 11:02 am
What the heck Anusha, you ask a question on the forum and then you answer your own question. Ha ha.

pushkar
Nov 3rd 2006, 10:23 am
But do u want to do like this??Do u want to make AprilFull someone???

Shamsher Nawaz
Nov 9th 2006, 7:43 am
Looks like anusha got the 606 post doing like this. haa haaaa.