Keith,
There's a tag called Cf_capitalize in the gallery that can do this... I
would take it and convert it to a UDF. There's probably already a UDF to do
this and other case conversions.
Mark
-Original Message-
From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17,
#UCase(Left(variable, 1))#
should work
will
William H. Bowen
Webmaster
ALSTOM's TD Energy Automation Information Business
Your friendly neighborhood Webmaster
[EMAIL PROTECTED]
http://www.esca.com/
425.739.3629 Voice
425.466.7016 Cell
425.739.3690 FAX
- Original Message -
From:
Someone made a tag called CF_ProperCase that should be what you are
looking for:
http://tinyclick.com/?08q2jd
HTH,
Jim Vosika
-Original Message-
From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 2:31 PM
To: CF-Talk
Subject: capitalize first letter
Hi
Hi everyone. I would like to capitalize the first letter of variable every
time it is displayed. What is the easiest way to do this? Thanks very
much.
The first letter of the contents of a variable, or the first letter of each word
within the contents of a variable? ... I usually wind up
At 03:31 PM 7/17/02 -0400, Wurst, Keith D. wrote:
Hi everyone. I would like to capitalize the first letter of variable every
time it is displayed. What is the easiest way to do this? Thanks very much.
http://www.teratech.com/coldcuts/cutdetail.cfm?cutid=109
T
Someone made a tag called CF_ProperCase that should be what you are
looking for:
http://tinyclick.com/?08q2jd
HTH,
Jim Vosika
-Original Message-
From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 2:31 PM
To: CF-Talk
Subject: capitalize first letter
Hi
there is a UDF on cflib that does this nicely.
matt
-Original Message-
From: Jim Vosika [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 3:51 PM
To: CF-Talk
Subject: RE: capitalize first letter
Someone made a tag called CF_ProperCase that should be what you are
looking
Here is the capFirstTitle UDF. Just copy and paste it.
CFSCRIPT
/**
* Returns a string with words capitalized for a title.
* Modified by Ray Camden to include var statements.
*
* @param initText String to be modified.
* @return Returns a string.
* @author Ed Hodder ([EMAIL PROTECTED])
PROTECTED]]
Sent: Wednesday, July 17, 2002 4:48 PM
To: CF-Talk
Subject: Re: capitalize first letter
Here is the capFirstTitle UDF. Just copy and paste it.
CFSCRIPT
/**
* Returns a string with words capitalized for a title.
* Modified by Ray Camden to include var statements.
*
* @param
lk
Subject: RE: Capitalize First Letter of Each Word
Steve,
This code dies if single letter words are present in the string eg "i".
Parameter 2 of function Right which is now "0" must be a positive integer,
as CF so succinctly puts it.
Added this:
cfset newword="&qu
Subject: RE: Capitalize First Letter of Each Word
Personally I think this should turn into a "Who can come up with the
longest, most convoluted, but beautifully artistic way to Capitalize
the First Letter of Each Word" competition.
Here's my attempt, I'm sure there are much longe
Neither does mine! And please note I commented it, so it looks long but is
actually only a few lines!
Paul
-Original Message-
From: Jeff Bevill [mailto:[EMAIL PROTECTED]]
Sent: 27 October 2000 09:32
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
Rich,
My "
.
---
-Original Message-
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 27, 2000 2:41 PM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
Ok, I think we have a winner.
James Lawrence from Freeserve
PROTECTED]]
Sent: Friday, October 27, 2000 9:38 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
Ok, I think we have a winner.
James Lawrence from Freeserve ([EMAIL PROTECTED]) submitted a little
JavaScript that does the job well on the client side. This was the
Its only
CFSET First_Name = "dave"
CFSET Last_Name = "hannum"
CFSET First = #LCase(First_Name)#
CFSET FirstName = "#UCase(left(First, 1))##mid(First, 2, len(First) - 1)#"
CFSET Last = #LCase(Last_Name)#
CFSET LastName = "#UCase(left(Last, 1))##mid(Last, 2, len(Last) - 1)#"
CFOUTPUT#FirstName#
Duh - Brain Fart - sorry - I DIDN'T read your whole question. This will do
only a couple of words effeciently.
Dave (egg on face)
- Original Message -
From: "Dave Hannum" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Thursday, October 26, 2000 8:47 AM
Sub
There's a very powerful custom tag in the gallery, that will capitalize any
string and is very customizable. I think the author is Nat Weisse. I used it
to properly capitalize news headlines.
- Original Message -
From: "John McKown" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent:
John,
Here's a javascript version ( haven't tested it properly, but it should be
ok )
SCRIPT LANGUAGE="JAVASCRIPT"
!--
function capitalizeMe(obj) {
val = obj.value;
newVal = '';
val = val.split(' ');
for(var c=0; c val.length; c++) {
newVal +=
8:54 AM
To: CF-Talk
Subject: Re: Capitalize First Letter of Each Word
Duh - Brain Fart - sorry - I DIDN'T read your whole question.
This will do
only a couple of words effeciently.
Dave (egg on face)
- Original Message -
From: "Dave Hannum" [EMAIL PROTECTED]
To
PROTECTED]]
Sent: Thursday, October 26, 2000 8:54 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
John,
Here's a javascript version ( haven't tested it properly, but it should be
ok )
SCRIPT LANGUAGE="JAVASCRIPT"
!--
function capitalizeMe(obj) {
val =
You could always lowercase the whole string by changing the first line to :
val = obj.value.toLowerCase();
-Original Message-
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2000 14:08
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
This JavaScript DOES
L PROTECTED]]
Sent: Thursday, October 26, 2000 9:08 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
This JavaScript DOES work, in the sense that it capitalizes the
first letter of each word, but it does not prevent kids from
entering stuff like this: "UnBeLiEvAbLe".
John
This would be the ColdFusion way of doing it, if you want to convert
it on server time rather than client, turning it into a tag should be
no problem.
Were you asking for JavaScript or CF?
cfset test = "here is a test I wonder if
cfoutput
cfloop list="#form.fieldname#" index="myindex" delimiters=" "
#Ucase(mid(myindex,1,1))##Lcase(mid(myindex,2,(len(myindex)-1)))#
/cfloop
/cfoutput
-Original Message-
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 7:35 AM
To: CF-Talk
Subject:
-
From: Jeff Bevill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 14:50
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
John McKown,
Here ya go man. I only had about 10 mins to write this, hope it works. :)
!--- l33t w3rd fixer v1.0 ---
!--- Jeff Be
PROTECTED]
Subject: RE: Capitalize First Letter of Each Word
John McKown,
Here ya go man. I only had about 10 mins to write this, hope it works. :)
!--- l33t w3rd fixer v1.0 ---
!--- Jeff Bevill - [EMAIL PROTECTED] ---
cfset Variable="UnBeLiEvAbLe"
cfif isDefined("Variable") an
to do it for multiple fields let me know. I can build that loop for
you as well.
--K
-Original Message-
From: Jeff Bevill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 6:50 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
John McKown,
Here ya go man. I on
PROTECTED]]
Sent: Thursday, October 26, 2000 9:17 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
You could always lowercase the whole string by changing the first
line to :
val = obj.value.toLowerCase();
-Original Message-
From: John McKown [mailto:[EMAIL
-Original Message-
From: Jeff Bevill [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2000 14:50
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
John McKown,
Here ya go man. I only had about 10 mins to write this, hope it works. :)
!--- l33t w3rd fixer v1.0 ---
!--- Jeff
Ticonderoga
-Original Message-
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 10:11 AM
To: CF-Talk
Subject: RE: Capitalize First Letter of Each Word
ok, cool. Thanks.
John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane, Suite 200 Dover, DE
30 matches
Mail list logo