Answered
Hello all!
I am looking for a script that changes lower case to upper case but ONLY the FIRST letter.
For example: If you type george clooney the script will change it to George Clooney.
I am not sure if it is possible with TWO different words (first and last name) on the SAME field.
The one that I am currently using changes the WHOLE text and that's not good for me.
Thanks!
CRamia
Do you need to exclude connective words and articles?
Do you need hyphenated words processed?
function FirstWordTitleCase(sWord) {
// force first letter of word to upper case and all others lower case
return sWord.substr(0, 1).toUpperCase() + sWord.substr(1).toLowerCase();
}function SimpleTitleCase(sInput) {
var aInput = sInput.split(" "); // make an array split at space
// for each element of word array, capitalize the first letter
for(i = 0; i
George Kaiser