Baski Posted April 1, 2006 Share Posted April 1, 2006 Hey There!im looking for a script that redirects to a html page depending on the time,kindda like this script:[code]<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 datevar dotw = today.getDay(); // get the day of the week // Sunday = 0, Monday = 1 ... Saturday = 6location.href = daysArray[dotw] + '.htm';//--></script>[/code]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 Link to comment https://forums.phpfreaks.com/topic/6330-redirect-depending-on-time/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.