CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Client side validations??

Print topic Send  topic

Author Message
brus
Posted: 10/30/2002, 6:18 PM

CC2.05, ASP, Templates
Anybody have a javascript client side forms validation library working from
CC they can share or recommend?

I've tried the formidable open source "qFormsAPI" - chokes on multiple
submit buttons of CC - would love to get it working for 'insert' and
'update' validations only
Also tried 'free' "fValidate" - -it needs much more maintenance of the HTML
template - and again the multiple submit buttons CC generates cause the
scripts to fail.

We need to validate only on insert and update. These two products run their
validations on delete and cancel as well - because CC generates them also
as type submit.

Anyone able to help??

TIA
B Rus.

.







cornwell
Posted: 10/31/2002, 2:00 PM

The fValidate scripts can be made to work, the cost is the of editing the
appropriate field tags of the HTML templates.

Javascript client side validations are good for useability and client
friendliness but if a client switches off javascript you'll encounter
problems if that's all you've got for validation. As well as client side
validations, server side validations should be maintained. If the client
side validations work correctly, the server side ones may never react in
anger and seem redundant, but if your client side validations ever fail, the
server side validations are your insurance the data is protected. Remember,
a client can turn off javascript by design or accident - then what
validates?.

In the file fValidate.js, at the very start - insert these two conditions,
so the start of the file will look like this ......

function validateForm(Frm, bConfirm, bDisable, bDisableR, groupError) {
// *** insert begins here
if (Frm.FormAction.value == 'cancel') {
return true ;
}
if (Frm.FormAction.value == 'delete') {
return true ;
}
// *** original code continues from here.

Try it out.
For anyone else interested in easy validation additions, fValidate can be
found at http://www.peterbailey.net/fValidate/site.php?page=index

If only Yes could incorporate a library like this, with an additional Field
property to fill in for the validation type.
That and DEPENDENT LISTBOXES - please.


HTH
Cornwell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"brus" <brus@tasmail.com> wrote in message
news:apq3t3$nan$1@news.codecharge.com...
> CC2.05, ASP, Templates
> Anybody have a javascript client side forms validation library working
from
> CC they can share or recommend?
>
> I've tried the formidable open source "qFormsAPI" - chokes on multiple
> submit buttons of CC - would love to get it working for 'insert' and
> 'update' validations only
> Also tried 'free' "fValidate" - -it needs much more maintenance of the
HTML
> template - and again the multiple submit buttons CC generates cause the
> scripts to fail.
>
> We need to validate only on insert and update. These two products run
their
> validations on delete and cancel as well - because CC generates them also
> as type submit.
>
> Anyone able to help??
>
> TIA
> B Rus.
>
> .
>
>
>
>
>
>
>
>





banjo
Posted: 11/07/2002, 3:00 PM

Better these additions to the original script.
This allows a confirm message on delete.

function validateForm(Frm, bConfirm, bDisable, bDisableR, groupError) {

if (Frm.FormAction.value == 'cancel') {
// alert(Frm.FormAction.value);
return true ;
}
if (Frm.FormAction.value == 'delete') {
if (bConfirm)
{
if(!confirm(fv['confirmMsg']))
{
if (fv['confirmAbortMsg'] != '') alert(fv['confirmAbortMsg']); // Displays
confim if requested
return false;
}
else {
return true ;
}
}
}

"cornwell" <cornwell@tasmail.com> wrote in message
news:aps95k$mph$1@news.codecharge.com...
> The fValidate scripts can be made to work, the cost is the of editing the
> appropriate field tags of the HTML templates.
>
> Javascript client side validations are good for useability and client
> friendliness but if a client switches off javascript you'll encounter
> problems if that's all you've got for validation. As well as client side
> validations, server side validations should be maintained. If the client
> side validations work correctly, the server side ones may never react in
> anger and seem redundant, but if your client side validations ever fail,
the
> server side validations are your insurance the data is protected.
Remember,
> a client can turn off javascript by design or accident - then what
> validates?.
>
> In the file fValidate.js, at the very start - insert these two conditions,
> so the start of the file will look like this ......
>
> function validateForm(Frm, bConfirm, bDisable, bDisableR, groupError) {
> // *** insert begins here
> if (Frm.FormAction.value == 'cancel') {
> return true ;
> }
> if (Frm.FormAction.value == 'delete') {
> return true ;
> }
> // *** original code continues from here.
>
> Try it out.
> For anyone else interested in easy validation additions, fValidate can be
> found at http://www.peterbailey.net/fValidate/site.php?page=index
>
> If only Yes could incorporate a library like this, with an additional
Field
> property to fill in for the validation type.
> That and DEPENDENT LISTBOXES - please.
>
>
> HTH
> Cornwell
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



   


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.