Solved

make user type only lowercase in textbox

Posted on 2013-06-01
4
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

749 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