hi i have a problem with age Updating, when i click the calendar the age textbox will autofill point to current date and it's working properly, but the problem when i test to change the Year on the System/Control Panel on my computer, the age not change automatically....i wondering how could it be......anyone can help...thxx
here's my code for calendar and age :
strThisElement = objMe.getattribute("IndexVal")
x= x & "px"
retVal = window.showModalDialog ("../../Calendar2/calDraw1.asp?Locale=Set""0","0","dialogWidth:248px;dialogHeight:208px;dialogleft:"& x &";dialogtop:"& y &";status: no;unadorned: yes;help: no;scroll:no")
If retVal <> "" Then
document.all(strThisElement).value = retVal
dateofbirth = document.frmQuery.DateOfBirth.value
age = round(datediff("m",dateofbirth,now)/12)
if datepart("m",dateofbirth) > datepart("m",now) then
document.frmQuery.Age.value = age - 1
document.frmQuery.Age.value = age
Sorry2, ok . I clear the problem i have. The Problem is, the Age Won't Change although i change the date time on the control panel. Then i Want it change automatically when maybe the user date time on the computer is not set for the current date...is that clear.... thx.....sorry make you confused....