Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

make user type only lowercase in textbox

Posted on 2013-06-01
4
Medium Priority
?
544 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

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…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…
Suggested Courses

604 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