CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Validate entry problem

Print topic Send  topic

Author Message
Waspman

Posts: 948
Posted: 10/17/2008, 12:56 PM

So I sent up a validation on key press.

It sort of works?

I say the field can only accept numbers i.e. 000

However when I try, it will allow letters for the first input? T00

The same on fields where I only want letters. 8TT

The maximun length is set, but it still lets me enter the first character as either a letter or number. The rest conform to my mask.

Has anyone else had this problem?

T
_________________
http://www.waspmedia.co.uk
View profile  Send private message
peterr


Posts: 5971
Posted: 10/18/2008, 1:11 PM

At least on our end we're not familiar with this issue. I'd recommend contacting product support to review your case.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Waspman

Posts: 948
Posted: 10/19/2008, 5:59 AM

Hi Peter,

It appears that this problem only occurs when you validate entry on "key press"

When you do it "On load" it's fine.

Why would this be?

I tested it on the CCS examples.
_________________
http://www.waspmedia.co.uk
View profile  Send private message
melvyn


Posts: 333
Posted: 10/19/2008, 8:58 AM

First, you're right: there's a issue with the first character when using onkeypress. I've tried validating phone numbers in order to get parenthesis, space and dash (800) 555-1234. Usually, the first parenthesis "(" usually don't fire. So I must use some workaround to append a parenthesis in the first character.

On Load don't work for this case. It's a totally different behavior.

You must use on change, and try some catch to evaluate the first char.

also, you can add "onchange" or "onkeypress" by yourself, just ignore the CCS event and at it by hand:

<input id="agencyPhone" onchange="validatePhone(this.value);" maxlength="15" size="15" value="{Phone}" name="{Phone_Name}" />


And add your js code in the header or included file, or whatever, simple avoid ccs event. it's the same thing anyway.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
Waspman

Posts: 948
Posted: 10/20/2008, 1:26 AM

It works both "On load" and "On Change"

I'm gona use "On Change" cos it seems more logical.
_________________
http://www.waspmedia.co.uk
View profile  Send private message
Waspman

Posts: 948
Posted: 10/20/2008, 3:13 AM

Sorry, I was wrong only the "On Load" works;-)
_________________
http://www.waspmedia.co.uk
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.