CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Capitalize Words

Print topic Send  topic

Author Message
ekendricks

Posts: 34
Posted: 05/14/2006, 10:14 AM

Using CCS - ASP - Sql Svr 2005

I using "TEXT-TRANSFORM: capitalize" for a textbox, on an entry form, each word is is capitalized. ie: The Big Red Hat.....
Its recorded in the database as ": the big red hat". What I need to accomplish is to capitalize all words, as the "TEXT-TRANSFORM: capitalize" does, but also record such in database, so that view pages, and reports will show same format.

Thanks in advance for suggestions.


Ernest
View profile  Send private message
rho


Posts: 85
Posted: 05/14/2006, 11:33 PM

One option is to captalize the value in the textbox using the ucase() function before submitting the form (BeforeUpdate and/or BeforeInsert event)
View profile  Send private message
eiden


Posts: 34
Posted: 05/15/2006, 2:25 PM

UCase() sets all the letters to uppercase. "the big red hat" will then be "THE BIG RED HAT", in other words not the solution that ekendricks is looking for.

Search for asp proper case on google ;)
View profile  Send private message
Edd


Posts: 547
Posted: 05/16/2006, 7:08 AM

Ernest,

The problem with proper case is that it does always work properly and that you need to let the user have the override capacity.

I think you should fire a javascipt event that on the onChange event propercases the field. A good Javascript function on proper casing can be fount at

http://www.apriori-it.co.uk/PCase.asp#

It even allows for the McDonalds and hyphenated names.

I would allow additional Javascript and a checkbox so the use can turn the proper casing off.

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Ernest
Posted: 05/17/2006, 6:09 AM

Thanks........ works great

Ernest

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.