CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Editable Grid - Change text to upper case before submit

Print topic Send  topic

Author Message
navcan

Posts: 61
Posted: 09/23/2005, 10:29 AM

Hello All,

Using CCS 2.3.0.28 (asp + sql). I have a editable grid of two text fields. Want to save the data in uppercase on submit whether it's an update or insert.

Tried the following code in "Before Execute Update" but no luck :(

form1.textbox1.value = LTrim(UCase(form1.textbox1.value))
form1.textbox2.value = LTrim(UCase(form1.textbox2.value))

Help please...
View profile  Send private message
mrachow


Posts: 509
Posted: 09/23/2005, 12:18 PM

Not sure at the moment but maybe Before Execute Update is to "late".

Give event OnValidate a try.
_________________
Best regards,
Michael
View profile  Send private message
Sergeant Pepper
Posted: 09/26/2005, 12:05 AM

It is possible with JavaScript.

In the "onBlur" Jave event simply use:
this.value = this.value.toUpperCase();

This will put your text to upper case.

Best
Stephan
Edd


Posts: 547
Posted: 09/26/2005, 6:43 AM

I personally would have created a trigger on the database. That way you will always get a consistent entry.

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

http://www.syntech.com.au
View profile  Send private message
DonB
Posted: 09/26/2005, 11:30 AM

Or at the least, up-case it in the Validate event (when your database
doesn't support triggers, for example). To rely on client-side scripting is
dangerous - people can have that disabled and then the data won't be
up-cased like you wanted.

--
DonB

http://www.gotodon.com/ccbth


"Edd" <Edd@forum.codecharge> wrote in message
news:64337fae4a07d4@news.codecharge.com...
> I personally would have created a trigger on the database. That way you
will
> always get a consistent entry.
>
> Edd
> _________________
> a simple idea....
> www.syntech.com.au
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

navcan

Posts: 61
Posted: 09/26/2005, 4:53 PM

Hi everyone,

It's always nice to have positive responses and various suggestions from the codecharge community. All of you suggested good ideas however I also got a response from support. The solution is very simple.

Just add the following code Before Build Update and Before Build Insert events (they are fired several times for every update and insert row).

form_name.DataSource.field_name.value = new_value

this worked perfect.

Thank you all for your superb support.

Regards,
navcan
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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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