Today is . Page created 03/10/07

Question Marks Age Calculator Age Calculator

Enter Your Date Of Birth In This Format mm dd yyyy
Month Date Year Hours



You have been living for:
In months:
In weeks:
In days:
In hours:
In minutes:
In seconds:
In Milliseconds:
Your next birthday will be in:

Just enter the birthday you wish to track and JavaScript will display the person's age, down to the second. Displays your age along with the day you were born.

We have tested the code in IE7.0, Firefox2.0.0.1, Opera9.10, Netscape8.1.2 and AOL Explorer1.5. This script worked well in IE7.0 and AOL Explorer1.5. In all other paltforms tested, it gave eroneous readings. In other words it did not work.

Depending on your knowledge of HTML and javascripts, this is an easy three (3) part copy and paste code that goes in both the <HEAD> and <BODY> sections (no reconfigurations) of your document. It also makes use of an onload event handler inserted directly into the <BODY> tag.

If you need a little refresher on howto add the onLoad event handler directly into the <BODY> tag, see the below examples:

Default <BODY> Tag ~ No onLoad event handler

<body bgcolor="#000000" text="#ba55dc" link="#fff8dc" alink="#fff8dc" vlink="#fff8dc">

Reconfigured <BODY> Tag ~ onLoad Event Handler Inserted

<body onLoad="start()" bgcolor="#000000" text="#ba55dc" link="#fff8dc" alink="#fff8dc" vlink="#fff8dc">

Add-On Not Included In Script Little Extra Not Included In The Script:     Since the <HEAD> section of this code is quite large (9 KB), you may want to consider making it into an external .js file so the page will not be so bloated with code. If you are a little unclear or need a little refresher on howto, it is quite simple. The <HEAD> section of code starts and ends with opening and closing JavaScript tags, See below:

  • Opens With:
    <SCRIPT LANGUAGE="JavaScript">

    <HEAD> section of code here

  • Closes With:
    // End -->
    </script>
  1. Remove the opening and closing JavaScript tags.
  2. Copy/cut and paste everything in-between into a notepad and save it as ageCalculator.js
  3. The newly created (Saved As) file will look something like this   ageCalculator.js
  4. Upload the newly created ageCalculator.js into your directory
  5. Paste the below snipplet of code into the <HEAD> section of your document to call ageCalculator.js
    <script type="text/javascript" src="ageCalculator.js"> </script>
  6. If you have uploaded the ageCalculator.js into a different directory, you will have to change the path of the above to reflect the location.
  7. If changing the path is a little confusing, grab the below link and it is explained in detail.
    Upload To Different Directory ]

If you would like to see an example of this effect with the use of an external.js file used in the <HEAD> section, grab the below link and you are there.
Effect With External.JS File ]

We hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our FAQ ] and if you can't find the answer there, contact us ].
Get Code Here ]   [ Rate This Page ]