Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to type uppercase in a text box

Status
Not open for further replies.

msng

Programmer
Oct 14, 2003
27
0
0
US
Is there a way that when the user is typing in the text box, that the letters get typed in the uppercase.

Please let me know. Thanks in advance.
 
Hi mate,

As Coldfusion runs on the server before it is sent to the browser, it is not possible for Coldfusion to do this.

You have the choice of either using JS forum216 to so this or waiting until the page has been submitted then getting Coldfusion to uppercase it.

Hope this helps

Wullie

Fresh Look - Quality Coldfusion Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Code:
<input type="text" name="xtest" onChange="this.value=this.value.toUpperCase()">

should work

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
if you want CF to do it, it can be done after the form is submitted.

Code:
ucase(form.fieldName)

the user doesn't really need to see that happening anyway.

Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so.
-Douglas Adams (1952-2001)
 
Thanks a lot, everyone.

Actually, I tried doing as follows in CF and it works good:

style="text-transform:uppercase"

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top