Link to home
Start Free TrialLog in
Avatar of NewMom2Brandon
NewMom2Brandon

asked on

URGENT Age / date of birth validation

Hello,

I could really use some help. I am using Classic ASP to develop this.  Can you please help me, I am pretty new to web development?

<input name="SpouseAge" class="text-body" id="SpouseAge" onkeypress ="checkDate(this)" size="8" maxlength="8"> (mm/dd/yy)

I  need to do the two items shown below:
1. Get the users age
2. Make sure they are 18 - 64 years old
3. Make sure they enter a valid DOB in the mm/dd/yy format.
Avatar of waltersnowslinarnold
waltersnowslinarnold
Flag of India image

if you write a onkeypress event, every single keypress the validation function will be triggered. No one can write his/her age on a single keypress.

Use onblur event
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NewMom2Brandon
NewMom2Brandon

ASKER

Thank you So much for your help!

I really appreciate it!