Forum Moderators: open

Message Too Old, No Replies

Javascript Calendar

linked to a different messages for different times of the year

         

limbo

10:22 am on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looking for a script that will display a piece of text depending what month of the year it is.

It needs to change the first day of each month and have 12 different messages. (Must be adjustable for weeks, seasons and astrological sequences also)

Ta

Limbo

RonPK

1:57 pm on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Basically:

<script type="text/javascript">
var message = new Array('January text', 'February text', 'March text');
var rightnow = new Date();
document.write(message[rightnow.getMonth()]);
</script>

Weeks, seasons and astrological voodoo are not incorporated into the JavaScript date object, so that will be thougher to accomplish. You'll need lists. However I'm sure someone will have scripted it before...

limbo

2:21 pm on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks RonPK

Thats spot for the date message.

Weeks, seasons and astrological voodoo are not incorporated into the JavaScript date object, so that will be tougher to accomplish. You'll need lists....

1 down 3 to go :)

Ta

Limbo