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 -> PHP

 AJAX Validation

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 04/09/2012, 10:50 PM

I really need some guidance in how to implement AJAX validation.
As an example, I have an editable grid where users enter a code and the record is stored in a DB table via AJAX UpdateDB. The code entered must exist in another table that holds all the codes.

Now, in PHP using the validate row event it is a piece of cake. My question is:

Can I call this event using AJAX and pass back a 'good' or 'bad' reference. If so....how?

Or, am I going about this incorrectly and is there a better method to validation the code the user enters?

Hoping for some help here!

Trevor
View profile  Send private message
clahti2

Posts: 107
Posted: 04/24/2012, 8:57 AM

Quote saseow:
I really need some guidance in how to implement AJAX validation.
As an example, I have an editable grid where users enter a code and the record is stored in a DB table via AJAX UpdateDB. The code entered must exist in another table that holds all the codes.

Now, in PHP using the validate row event it is a piece of cake. My question is:

Can I call this event using AJAX and pass back a 'good' or 'bad' reference. If so....how?

Or, am I going about this incorrectly and is there a better method to validation the code the user enters?

Hoping for some help here!

Trevor

If the values exist in another table why would you not simply use a drop list populated from this other table rather than have the user type in the field?
View profile  Send private message
saseow

Posts: 744
Posted: 04/24/2012, 10:48 AM

Thank you for your input clahti2.

The problem is that the typing in of the codes has to be handled extremely fast i.e. as fast as the user can type using the number pad. Using AJAX the typing can be faster than the database updating as the AJAX calls will be buffered and continue even after the user has stopped typing and the DB interaction will then catch up. All the user does is type in a number and hit the ENTER key then the next number etc., etc. A list box will just never be as quick as is required.

What I have done is simply do the validation by showing the results in grid in an update panel. Each code has a description so if a description is missing in the results grid the code entered was not valid. Not the most elegant solution hence my query about AJAX validation.

Thanks again for the input clahti2.
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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