Jump to content


Photo

Redirect Depending On Time


  • Please log in to reply
No replies to this topic

#1 Baski

Baski
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 01 April 2006 - 01:38 PM

Hey There!

im looking for a script that redirects to a html page depending on the time,
kindda like this script:
<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>
but then for time, in 24hour format.
Also, it would be good if it had a variable like, if the time is past 16:00, go to notime.html.


Hope somebody can help!

- Bas




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users