Click here to Skip to main content
15,070,974 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to compare a character to it's ascci value for validation....

I WANT a code for it
i want to validate any text that not include special character and
numeric number is javascript...
How can i do....?
Posted
Updated 8-Dec-11 4:04am
v4
Comments
fjdiewornncalwe 8-Dec-11 9:43am
   
Demanding code is not how to get things done here, friend. You would be much better served by asking politely instead.
Michel [mjbohn] 8-Dec-11 10:03am
   
Why do you shout? It's rude :(

You should use a regular expression to achieve what you are trying to do. Because you demand code, I'll give you this. You can find out about using regular expressions by checking out some of these links. Javascript Regular Expressions[^]
   
Comments
Michel [mjbohn] 8-Dec-11 10:00am
   
RegEx yepp
5+
try this :
JavaScript
function Validation {
if ((e.which < 123 && e.which > 96))
        {
            return true;
        }
        if ((e.which < 91 && e.which > 64)) 
        {
            return true;
        }
        else
        {
            return false;
        }
}


Don't forget to mark as answer if it helps. :)
   

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