This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Automaticaly capitalising text using Javascript  RSS feed

 
Ronan Dowd
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a form with an input textfield, called "name". I would like for a user to type into this field his name and for Javascript to automatically capitalize the first letter of his input (once the user tabs or clicks off the textfield)

Would anyone any code samples/links where I could get some javascript to do this.

Thanks in advance - Ro.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basic idea:



Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh and

onblur="this.value=this.value.firtstLetterToCap()"

Eric
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!