Solved

make user type only lowercase in textbox

Posted on 2013-06-01
4
500 Views
Last Modified: 2013-06-02
The normal procedure for an textbox is let the use type whatever they want, so the user can type all text uppercase.

I just don~t want that, i want to let the user type only the first character of each word uppercase, but that~s if he types uppercase.

example:

user typed      =   result
I LOVE TO EAT = I Love To Eat
I love to eat    = I love to eat
I Love to eat   = I Love to eat

so the first character is always uppercase, but the rest of the words  is lowercase if the user don~t type uppercase, but it he does type only the first character is uppercase.

I want to do this in javascript so the change will be visible while he is typing.
0
Comment
Question by:rafaelrgl
4 Comments
 
LVL 40
ID: 39213953
You need to be sure that you really want to implement that feature. It would prevent the user from being able to write "John and Mary love to eat" or "Can you tell me what I love to eat?"
0
 
LVL 82

Expert Comment

by:leakim971
ID: 39214191
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 39214328
change will be visible while he is typing.

This will leave the first character of any word the way it was typed (upper or lower case) but change all other characters to lowercase as the user is typing. A phrase like "JoHn and Mary LOVE TO EAT" will become "John and Mary Love To Eat". It will not however correct mistakes. So if "Can you tell me what I love to eat?" is typed in all lower case, it will remain all lower case.

http://jsfiddle.net/cFWFW/
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39214348
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now