HighDots Forums  

Character Tuning

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Character Tuning in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gareth
 
Posts: n/a

Default Character Tuning - 07-10-2004 , 03:27 AM






I want to alter certain letters to uppercase or lowercase when submitted to
a database eg the first letter in you surname to upper, the end of the
surname to lower case. Also is there a way of taking an alphabetical list
and putting spaces in between each change of letter?

G



Reply With Quote
  #2  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Character Tuning - 07-10-2004 , 08:29 AM






On 10 Jul 2004 in macromedia.dreamweaver, Gareth wrote:

Quote:
I want to alter certain letters to uppercase or lowercase when
submitted to a database eg the first letter in you surname to upper,
the end of the surname to lower case.
Relatively easy in most scripting languages. What do you have available?
Also, consider: what about the (numerous) special cases (Mc/Mac, d',
van/von, O', de la ...)

Quote:
Also is there a way of taking an alphabetical list and putting
spaces in between each change of letter?
In what kind of context? Again, not difficult in most scripting
languages.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #3  
Old   
Gareth
 
Posts: n/a

Default Re: Character Tuning - 07-11-2004 , 11:26 AM




"Joe Makowiec" <makowiec (AT) invalid (DOT) invalid> wrote

Quote:
On 10 Jul 2004 in macromedia.dreamweaver, Gareth wrote:

I want to alter certain letters to uppercase or lowercase when
submitted to a database eg the first letter in you surname to upper,
the end of the surname to lower case.

Relatively easy in most scripting languages. What do you have available?
Also, consider: what about the (numerous) special cases (Mc/Mac, d',
van/von, O', de la ...)

Also is there a way of taking an alphabetical list and putting
spaces in between each change of letter?

In what kind of context? Again, not difficult in most scripting
languages.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Well say it is a list of names i just want to seperate the a's from the b's,
i am using VB Script ASP. Bad example in the first instance basically i have
many customers who have a unique code when adding that to a database i want
to make sure it is stored in a certain way ie uppercase for some leeters and
lower case for others. say like a national insurance number? AA123456A want
to make sure that the a's are submitted as capital's.

G




Reply With Quote
  #4  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Character Tuning - 07-11-2004 , 07:21 PM



On 11 Jul 2004 in macromedia.dreamweaver, Gareth wrote:

Quote:
Well say it is a list of names i just want to seperate the a's from
the b's, i am using VB Script ASP.
Disclaimer: I just translated this from PHP; the syntax works in PHP,
but is untested in vbscript:

do while ... ' condition should be Not EOF
' load data from database into variables, particularly last name into lastname
currInitial = left(lastname,1) ' Get the initial
if (currInitial <> lastInitial) ' If it's changed from the previous person
document.write("<p>" & currLastInitial & "</p>") 'Print a paragraph with the new initial
lastInitial = currInitial ' Reset lastInitial so it matches current record
endif
document.write("<p>") ' start a new paragraph for a new individual
' or pick your favorite structure
document.write(lastname)
document.write() ' whatever else
document.write("</p>") ' start a new paragraph
lastInitial = currInitial ' reset the initial, so we can check if the next name is the start
loop


Quote:
Bad example in the first instance
basically i have many customers who have a unique code when adding
that to a database i want to make sure it is stored in a certain way
ie uppercase for some leeters and lower case for others. say like a
national insurance number? AA123456A want to make sure that the a's
are submitted as capital's.
string = UCase(string)

You might want to consider the wisdom of making all the letters in a
mixed string like that one case or the other, or else program so that
it doesn't matter whether they are uppercase or lowercase. Using
mixed case can cause you major problems.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.