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
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 = makeArray.arguments; } 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>