CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How the best way to Capitalize entered data

Print topic Send  topic

Author Message
muhd fauzi
Posted: 03/02/2004, 6:04 PM

I got one generi question. What is the best approach to capture data entry
data is kept capitalize in mysql.
There are few options cross my mind
1. use VBscript in every forms
2. Use mysql function

If there is any other way appreciate input.

tia

DonB
Posted: 03/03/2004, 7:51 AM

One way would be to utilize the RegExp object, probably in the server's
Validate event. Regular expressions are pretty arcane, so I will not
attempt to come up with one that works. Best to search Google for a
suitable example. But I'm sure there are some out there that enable you to
capitalize words.

Maybe you mean "all capitals", not just "capitalize"? Then simply use the
ToUpperCase() method in javascript (browser side) or the Ucase() function
(server side).

--
DonB

http://www.gotodon.com/ccbth


"muhd fauzi" <mfauzim@hotmail.com> wrote in message
news:c23eep$cpd$2@news.codecharge.com...
> I got one generi question. What is the best approach to capture data entry
> data is kept capitalize in mysql.
> There are few options cross my mind
> 1. use VBscript in every forms
> 2. Use mysql function
>
> If there is any other way appreciate input.
>
> tia
>
>

muhd fauzi
Posted: 03/03/2004, 5:12 PM

Thnaks DonB, you always give the right answer, I meant all capitalize.

tx
"DonB" <~ccbth~@gotodon.com> wrote in message
news:c24uti$ihe$1@news.codecharge.com...
> One way would be to utilize the RegExp object, probably in the server's
> Validate event. Regular expressions are pretty arcane, so I will not
> attempt to come up with one that works. Best to search Google for a
> suitable example. But I'm sure there are some out there that enable you
to
> capitalize words.
>
> Maybe you mean "all capitals", not just "capitalize"? Then simply use the
> ToUpperCase() method in javascript (browser side) or the Ucase() function
> (server side).
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "muhd fauzi" <mfauzim@hotmail.com> wrote in message
>news:c23eep$cpd$2@news.codecharge.com...
> > I got one generi question. What is the best approach to capture data
entry
> > data is kept capitalize in mysql.
> > There are few options cross my mind
> > 1. use VBscript in every forms
> > 2. Use mysql function
> >
> > If there is any other way appreciate input.
> >
> > tia
> >
> >
>
>

muhd fauzi
Posted: 03/04/2004, 9:01 PM

Hi DonB, where do I put the touppercase(). Is it in the textcontrol event?
which one and whats the format. I've tried to use
touppercase() in onchange or onkeypress event but nothing change.

thanks

"DonB" <~ccbth~@gotodon.com> wrote in message
news:c24uti$ihe$1@news.codecharge.com...
> One way would be to utilize the RegExp object, probably in the server's
> Validate event. Regular expressions are pretty arcane, so I will not
> attempt to come up with one that works. Best to search Google for a
> suitable example. But I'm sure there are some out there that enable you
to
> capitalize words.
>
> Maybe you mean "all capitals", not just "capitalize"? Then simply use the
> ToUpperCase() method in javascript (browser side) or the Ucase() function
> (server side).
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
> "muhd fauzi" <mfauzim@hotmail.com> wrote in message
>news:c23eep$cpd$2@news.codecharge.com...
> > I got one generi question. What is the best approach to capture data
entry
> > data is kept capitalize in mysql.
> > There are few options cross my mind
> > 1. use VBscript in every forms
> > 2. Use mysql function
> >
> > If there is any other way appreciate input.
> >
> > tia
> >
> >
>
>

DonB
Posted: 03/05/2004, 5:16 AM

That is a javascript method which you'd put in the onchange of a textbox
(client-side, of course). The event will not fire until the control loses
focus, however. So be sure to tab to, or click on, some other field on the
page. Then the even should fire. I would write it like this:

this.toUpperCase();

(Note the goofy capitalization - it is required to be exactly as shown)

If you have any question about whether the events are working or not, an
easy way to confirm this is to include one line of code:

alert('the onchange event fired');

and put this in the event handler. It will pop up a message box so you know
it's working.

--
DonB

http://www.gotodon.com/ccbth


"muhd fauzi" <mfauzim@hotmail.com> wrote in message
news:c291k5$htp$2@news.codecharge.com...
> Hi DonB, where do I put the touppercase(). Is it in the textcontrol event?
> which one and whats the format. I've tried to use
> touppercase() in onchange or onkeypress event but nothing change.
>
> thanks
>
> "DonB" <~ccbth~@gotodon.com> wrote in message
>news:c24uti$ihe$1@news.codecharge.com...
> > One way would be to utilize the RegExp object, probably in the server's
> > Validate event. Regular expressions are pretty arcane, so I will not
> > attempt to come up with one that works. Best to search Google for a
> > suitable example. But I'm sure there are some out there that enable you
> to
> > capitalize words.
> >
> > Maybe you mean "all capitals", not just "capitalize"? Then simply use
the
> > ToUpperCase() method in javascript (browser side) or the Ucase()
function
> > (server side).
> >
> > --
> > DonB
> >
> > http://www.gotodon.com/ccbth
> >
> >
> > "muhd fauzi" <mfauzim@hotmail.com> wrote in message
> >news:c23eep$cpd$2@news.codecharge.com...
> > > I got one generi question. What is the best approach to capture data
> entry
> > > data is kept capitalize in mysql.
> > > There are few options cross my mind
> > > 1. use VBscript in every forms
> > > 2. Use mysql function
> > >
> > > If there is any other way appreciate input.
> > >
> > > tia
> > >
> > >
> >
> >
>
>

bobaol

Posts: 8
Posted: 03/23/2004, 3:05 AM

Hi DonB,

I tried your method and for some reason couldn't get it to work for me. I changed it slightly to : this.value=this.value.toUpperCase(); which did work.

Any reason one is better than the other?

Cheers,
Bob
View profile  Send private message
DonB
Posted: 03/23/2004, 5:12 AM

I love languages that impose case-sensitive keywords on us - why make it
simpler for us humans ;-)?. I typed "ToUpperCase" however javascript doesn't
treat that like "toUpperCase" and so it was not executing the conversion at
all.

--
DonB

http://www.gotodon.com/ccbth


"bobaol" <bobaol@forum.codecharge> wrote in message
news:640601a00f3522@news.codecharge.com...
> Hi DonB,
>
> I tried your method and for some reason couldn't get it to work for me. I
changed it slightly to : this.value=this.value.toUpperCase(); which did
work.
>
> Any reason one is better than the other?
>
> Cheers,
> Bob
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

RES

Posts: 21
Posted: 06/16/2005, 1:09 PM

DONB,

i can't seem to get this to work for me. if i go to the textbox and do a custom code for the on change event (client side). Here is my custom code:

function page_CARE_ENCOUNTER_PATIENTSearch1_s_keyword_OnChange()
{
var result;
//End page_CARE_ENCOUNTER_PATIENTSearch1_s_keyword_OnChange

//Custom Code @69-2A29BDB7
// -------------------------
// Write your own code here.
this.toUpperCase();
// -------------------------
//End Custom Code

//Close page_CARE_ENCOUNTER_PATIENTSearch1_s_keyword_OnChange @66-BC33A33A
return result;
}


the error message i get is "Object doesn't support this property or method"

Please help. thanks.
_________________
RES
View profile  Send private message
Nicole

Posts: 586
Posted: 06/17/2005, 6:49 AM

Hello,
Try
this.value.toUpperCase();

_________________
Regards,
Nicole
View profile  Send private message
RES

Posts: 21
Posted: 06/17/2005, 6:57 AM

doesn't work. no result. no error. i dont think it's eeven executing on change.
_________________
RES
View profile  Send private message
peterr


Posts: 5971
Posted: 06/17/2005, 7:05 AM

It should be easier to not use events for this, just add your JavaScript to the HTML directly. Using client events is usually an overkill and not needed. Client events are available mostly for CCS-specific validations and actions.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.