Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
well now i have a textbox ,i have to validate it on blur that it must enter only 9 or 10 number of digits

& another textbox has to be validate by

I am working in asp classic.well now i have a textbox ,i have to validate it on blur that it must enter only 9 or 10 number of alphanumeric

both should be at onblur

I am using classic asp
Posted

You can use length[^] property in JavaScript to validate the text box input in onchange[^] event.
You can use isNaN()[^] to check if the value entered is numeric or not.
 
Share this answer
 
v2
you can use maxlenth property of textbox, by using this property you are able to give length of your choice.
 
Share this answer
 
Comments
Ali_100 14-Sep-12 5:12am    
I wrote also that i m using classic asp

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900