• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Day of the week page load

I'm wanting to develop a site that will list a specific page depending on the day of the week.  The specific pages will be displayed in a frameset.

Anyone know of a script or something that would make this possible?

Thanks,

Chuck
0
Mandaka
Asked:
Mandaka
1 Solution
 
zs6phdCommented:
From www.activeserverpages.com:

<%response.buffer=true%>
<html><head>
<title>dailypage.asp</title>
</head>
<body>
<%
whatweekday=Weekday(now())
select case whatweekday
case vbSunday
response.redirect "http://url/sunday.htm"
case vbMonday
response.redirect "http://url/monday.htm"
case vbTuesday
response.redirect "http://url/tuesday.htm"
case vbWednesday
......etc
end select
%>
</body>
</html>

I have not looked at how this needs to be modified for a frameset.

REMEMBER: This code will run on the server, and hence will work according to the server's clock.  Therefore, users in other time zones may see messages for the previous or the next day depending on the time of day and the time zone difference.  If you need it to use the user's time zone then you either need to write script which runs on the user's browser - which means that your users must have certain levels of browsers - or it may be possible to interrogate the browser to find out what the user's local time and day may be.

Regards

Peter
0
 
MandakaAuthor Commented:
Ahhh...using ASP.  Didn't even think of that....GOOD CALL!!!

Thanks Peter!

Chuck
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now