Simple Calendar

C

Chuck

I have a calendar page on my swim team website that lists 12 months of
simple calendars. The problem is that users have to page through old data to
get to the "current" month as the season progresses.

I'm thinking about putting a list of hyperlinks at the top of the page that
would bookmark the appropriate calendar and allow the user to jump to the
desired month... .but what I'd really like to do is automatically jump to
the "current" month based on the system date.

Can that be accomplished?
 
M

MD Websunlimited

Yes, both can be accomplished but have you considered using an iframe and dynamically changing the content to the current month?

In the current context create bookmarks above each calendar of the form Calx where x is the numeric month of the year starting with
0, e.g., Jan is Cal0 and Dec. is Cal11

Then the code for the onload event is

<body onload="oDate = new Date(); location.href='#Cal' + oDate.getMonth();" >
 
C

Chuck

if I use the iframe approach could people still scroll back to see
"historical" information?
 
C

Chris Leeds, MVP-FrontPage

an I-frame can show any content any other browser window can, so if the user
could do it on a "regular" page they should be able to do it within an
I-frame.

--
Chris Leeds,
Microsoft MVP-FrontPage

Please feel free to contact me here:
http://nedp.net/contact/
--
 
C

Chuck Duchon

The onload worked perfectly in my application. My next enhancement, and
probably my next plea for help, will be to build a calendar that can
dynamically load events from a data base....

MD Websunlimited said:
Yes, both can be accomplished but have you considered using an iframe and
dynamically changing the content to the current month?
In the current context create bookmarks above each calendar of the form
Calx where x is the numeric month of the year starting with
 
Top