473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Formatting function

CK
Is there an easy javascript function that takes a string and returns a
properly formatted string?

Like "john smith" would be "John Smith".

Any ideas? In vbScript there is a vbProperCase constant used with their
formatting function. Is there something simliar in javascript?

Thanks to everyone who replies,
Chris
Jan 9 '06 #1
3 1009
CK wrote on 09 jan 2006 in comp.lang.javascript:
Is there an easy javascript function that takes a string and returns a
properly formatted string?

Like "john smith" would be "John Smith".


This has been covered in this NG in 2003, see the archive.

<http://groups.google.com/group/micro...sp.general/bro
wse_frm/thread/6dde9f112289d86/4385df9a5e0459c9>

or

<http://tinyurl.com/behgp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 9 '06 #2
CK said the following on 1/9/2006 4:14 PM:
Is there an easy javascript function that takes a string and returns a
properly formatted string?

Like "john smith" would be "John Smith".


I don't think Peter O'Malley or John deGaulle would agree with that
correction.

Let users enter it the way they want and then let them suffer any and
all consequences.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 9 '06 #3
CK
Thanks man! That'll work.

CK

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
CK wrote on 09 jan 2006 in comp.lang.javascript:
Is there an easy javascript function that takes a string and returns a
properly formatted string?

Like "john smith" would be "John Smith".


This has been covered in this NG in 2003, see the archive.

<http://groups.google.com/group/micro...sp.general/bro
wse_frm/thread/6dde9f112289d86/4385df9a5e0459c9>

or

<http://tinyurl.com/behgp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jan 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
4
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
1
by: D. Shane Fowlkes | last post by:
Hey guys. I have a Repeater and a Template. One of the dataitems calls a helper function. The dataitem sends the record ID to the function and the function runs a complex query and returns a...
4
by: hope | last post by:
Hi, How can I format a string field using Data Formatting Expression property in datagrid? For example: format last name from BROWN to Brown. Thanks
10
by: Coleen | last post by:
Hi all :-) I have a weird formatting problem with an HTML table that I am populating using VB.Net and HTML. Here is the snippet of code for the cell I'm trying to format: Dim...
8
by: Vinay Jain | last post by:
Hi.. I am newbe in postgresql so please help me though the question may be very easy to answer.. Is there any formatting function to get output with fix lengths..for example my query is.. schema...
25
by: mdh | last post by:
Hi Group, Not looking for an answer, but more of an explanation. Thinking back to those heady days when you had the time to do them, may I ask this. Exercise 1-22 asks for a program to "fold"...
10
by: Lyn | last post by:
Hi, I would like to make a bound text box not visible if it is empty (not just disable it). This option is not available from the standard conditional formatting feature (at least, not that I can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.