FORUMS: list search recent posts

javascript updates by day

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dan McGuirejavascript updates by day
by on Jan 23, 2006 at 3:31:16 pm


I am building a site for a YMCA. Each day there are different fitness classes, and I would like the main page to show the current day's classes. I have a script that puts up a new message based on the our of the day, <>but I want the message to update based on the day of the week.

The other option would be to have a seven different main pages placed on my server for each day of the week. But how would I communicate to the server to tell it to load the appropriate page on a daily basis.

Forgive the newbie nature of this question.


Return to posts index

Curtis ThompsonRe: javascript updates by day
by on Jan 23, 2006 at 4:56:17 pm


well - with either javascript or a server-side scripting language, you can retrieve the day of the week from a date object - it's either typically returned as a numer (0-6) or you can return it as a string value in some date functions (like in php)...but that will give you the power you need to show something based on what day it is...

if you had a schedule file to show, you have a few options. one would be to use a server-side script like php and just test with that script and show the appropriate schedule. another would be to use javascript and an iframe with either name jumps or separate schedule files. i made an example of that (with the latter) here:

hope that helps!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved