|
Re: Age Calculation
Thanks for the response.....Not exactly what I'm looking for. What I need is something on the order of the script below.
---------------------------------------------------------
<script language="JavaScript">
function age() {
var DOB = (document.Dui.DOB.value);
var DateWritten = (document.Dui.DateWritten.value);
If Month(DateWritten) < Month(DOB) Or (Month(DateWritten) = _
Month(DOB) And Day(DateWritten) < Day(DOB)) Then
document.Dui.Age.value = Year(DateWritten) - Year(DOB) - 1
Else
document.Dui.Age.value = Year(DateWritten) - Year(DOB)
End If
End Function
}
</script>
---------------------------------------------------------------
When I run the above script, I get no results: "Error on page".
Thanks
Ernest
Last edited by ekendricks; May 9th, 2006 at 00:41.
|