This is a discussion on Birthday Script within the Java forums, part of the Programming Talk category; Code: <script language="JavaScript"> var arrBday = [ ['Bob','11/23/1973'], ['Peter','9/22/1977'], ['John','9/...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Birthday Script
Code:
<script language="JavaScript">
var arrBday = [
['Bob','11/23/1973'],
['Peter','9/22/1977'],
['John','9/22/1999']
];
function displayBdayList(today){
var bday,strList='';
for (var i=0;i<arrBday.length;i++){
bday = new Date(arrBday[i][1]);
if (!isNaN(bday) && bday.getMonth()==today.getMonth() && bday.getDate()==today.getDate())
strList+='- '+arrBday[i][0]+" ("+(today.getFullYear()-bday.getFullYear())+")<br>";
}
if (strList=='') strList='- NONE'
document.write("<h4>Today's Birtdays:</h4>"+strList)
}
displayBdayList(new Date());
</script>
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free iPod Script | Duality | PHP | 4 | 12-07-2006 02:29 AM |
| Perl Script Scheduling On Unix Webserver | encoder | Perl | 0 | 04-26-2006 11:34 PM |
| Python script problem | Zarooka | Python | 1 | 04-20-2006 07:46 PM |
| Who wrote "Happy Birthday to You"? | JobHelper | Chit-Chat | 0 | 02-24-2006 02:30 AM |
| Position C/C++,HP-UX, Shell Script | kalareddy | Experienced Job Seekers - India | 0 | 06-07-2005 09:46 AM |