Solved

make user type only lowercase in textbox

Posted on 2013-06-01
4
487 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

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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
Comment Utility
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
Comment Utility
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
Comment Utility
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now