This script determins the current date, and if that date is someones birthday (from a list of birthdays, names and dates) It prints a customisable message.
(different message for eagh entry if you want!)

It's a very simple script but it works well. Put it between HTML tags to change the output text apperance.

you will see that the people with their birthdays in the next 6 days are incremented by a year... why does this happen... i don't know... so until somebody comes up with the explaination and the right solution... here is mine that should work fine...

just make this change in your displayBdayList function from

Code:

if (diff > 0) bdayList[idx].age = bdayList[idx].age + 1;

to this

Code:

if (diff > 6) bdayList[idx].age = bdayList[idx].age + 1;

11-09-2005, 04:09 PM

nath192

hey NS

thanks very much...seeems to have worked now. thanks for looking at it for me, nathan.

ps went to India when I was 16 about 6 years ago.. wonderful country!

11-09-2005, 04:44 PM

Nischumacher

as i said... it will work... but i still maintain that it is not the best solution...
PS : never been to england :)

11-18-2005, 12:06 AM

notcalvin

Is there a limit to the number of "birthday entries" these scripts can have?
I've tried both of the basic scripts from the beginning of this thread and have placed 43 entries into each one and get script errors when I try to have it on a webpage.

11-18-2005, 02:52 AM

glenngv

What error message? You probably have misplaced quotes or brackets in the birthday array definition. Run the code in Firefox to easily spot the error.