File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Automaticaly capitalising text using Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Automaticaly capitalising text using Javascript" Watch "Automaticaly capitalising text using Javascript" New topic
Author

Automaticaly capitalising text using Javascript

Ronan Dowd
Ranch Hand

Joined: Jan 21, 2006
Posts: 84
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.


SCJP 1.4 | OCWCD JEE 5
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
basic idea:



Eric
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
oh and

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

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Automaticaly capitalising text using Javascript