Win a copy of Murach's Python Programming this week in the Jython/Python 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!