Hi Benign,
Your best bet is to take advantage of the free support
incident you get with
Validation Toolkit. Visit WebAssist.com and log in; then go
to Support >
Technical Support > Submit Incident and fill out the form.
Although no one
is in the office over the weekend, you'll get a response
first thing Monday
morning.
FWIW, I use the Validation Toolkit on CF pages both client
and server-side
in a number of sites, so I know it works from personal
experience.
Best - Joe
Joseph Lowery
Director of Marketing, WebAssist
Author, Dreamweaver 8 Bible
"Benign" <webforumsuser@macromedia.com> wrote in
message
news:egqkvk$p6k$1@forums.macromedia.com...
> Hi:
> I use WA(webassist) Validation Toolkit to validate my CF
pages but it
> doesn't
> validate the page at all. I used the client side
validation and serverside
> validation both but no way. It does nothing! I attached
the code with
> server
> side and client side validations with the hope that you
folks help me out
> of
> trouble. I need to validate many many forms and the only
easy way I found
> was
> WA Validation Toolkit. Please please help me.
> Thanks
> Benign
>
> p1.cfm with CLIENT SIDE VALIDATION
>
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <title>p1</title>
> <script type="text/JavaScript">
> <!--
> function WAAddError(formElement,errorMsg,focusIt,stopIt)
{
> if (document.WAFV_Error) {
> document.WAFV_Error += "\n" + errorMsg;
> }
> else {
> document.WAFV_Error = errorMsg;
> }
> if (!document.WAFV_InvalidArray) {
> document.WAFV_InvalidArray = new Array();
> }
>
document.WAFV_InvalidArray[document.WAFV_InvalidArray.length] =
> formElement;
> if (focusIt && !document.WAFV_Focus) {
> document.WAFV_Focus = focusIt;
> }
>
> if (stopIt == 1) {
> document.WAFV_Stop = true;
> }
> else if (stopIt == 2) {
> formElement.WAFV_Continue = true;
> }
> else if (stopIt == 3) {
> formElement.WAFV_Stop = true;
> formElement.WAFV_Continue = false;
> }
> }
>
> function
>
WAValidateAN(formElement,value,errorMsg,allowUpper,allowLower,allowNumbers,allow
> Space,extraChars,focusIt,stopIt,required) {
> var isValid = true;
> extraChars = extraChars.replace(/"/g,'"');
> if ((!document.WAFV_Stop &&
!formElement.WAFV_Stop) ||
> formElement.WAFV_Continue) {
> for (var x=0; x<value.length; x++) {
> var charGood = false;
> var nextChar = value.charAt(x);
> var charCode = value.charCodeAt(x);
> if (allowLower) {
> if (charCode >= 97 && charCode <= 122) {
> charGood = true;
> }
> }
> if (allowUpper) {
> if (charCode >= 65 && charCode <= 90) {
> charGood = true;
> }
> }
> if (allowNumbers) {
> if (charCode >= 48 && charCode <= 57) {
> charGood = true;
> }
> }
> if (allowSpace) {
> if (nextChar == " ") {
> charGood = true;
> }
> }
> if (extraChars) {
> if (unescape(extraChars).indexOf(nextChar) >= 0) {
> charGood = true;
> }
> }
> if (!charGood) {
> isValid = false;
> x = value.length;
> }
> }
> if (required && value=="")
> isValid = false;
> }
> if (!isValid) {
> WAAddError(formElement,errorMsg,focusIt,stopIt);
> }
> }
> //-->
> </script>
> </head>
> <body>
> <form action="/cf_register/p2.cfm" method="post"
name="patientform"
>
onSubmit="WAValidateAN(document.patientform.patientname,document.patientform.pat
> ientname.value,'- Invalid character in
>
entry',true,false,false,true,'',document.patientform.patientname,0,true)"
> ><br
> />
> <input type="text" name="patientname" size="32" />
> <br />
> <input type="submit" name="submit" />
> </form>
>
> </body>
>
> </html>
>
>
> p1.cfm with SERVER SIDE VALIDATION
>
> <cfinclude
template="../WA_ValidationToolkit/WAVT_Scripts_CF.cfm"/>
> <cfinclude
template="../WA_ValidationToolkit/WAVT_ValidatedForm_CF.cfm"/>
> <cfif CGI.Request_Method EQ "POST" >
> <cfset WAFV_Redirect="" />
> <cfset WAFV_Errors="" />
> <cfset Session.WAVT_p1="" />
> <cfif (WAFV_Redirect EQ "")>
> <cfset WAFV_Redirect = cgi.SCRIPT_NAME />
> </cfif>
> <cfset WAFV_Errors = WAFV_Errors &
>
WAValidateRQ(IIf(isDefined("Form.patientname"),"Form.patientname",DE(""))
> &
> "",true,1) />
> <cfif WAFV_Errors NEQ "">
> <cfset postVariables = "WAVT_p1=" &
> Right(WAFV_Errors,Len(WAFV_Errors)-1)>
> <cfloop collection="#form#" item="i" >
> <cfset postVariables = postVariables &
"&WAVT_" & i & "=" & form
> />
> </cfloop>
> <cfset Session.WAVT_p1 = postVariables />
> <cflocation url="#WAFV_Redirect#">
> </cfif>
> </cfif>
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <title>p1</title>
> </head>
> <body>
> <form method="post" name="patientform"
action="/cf_register/p2.cfm" ><br
> />
> <input type="text" name="patientname" size="32" />
> <br />
> <input type="submit" name="submit" />
> </form>
>
> </body>
>
> </html>
>