Why use cflocation at all? Why not simply cfinclude the form template?

> -----Original Message-----
> From: Mark Leder [mailto:[EMAIL PROTECTED]]
> Sent: lundi 1 juillet 2002 16:57
> To: CF-Talk
> Subject: Aggregating server side form validation messages
> 
> 
> I'm doing both client side (JS) and server-side form validation.
> Typically in JS Client side, if there are a number of required fields
> not filled in by the user, upon submit, a single popup alert occurs
> listing all the fields that need to be filled in.
> 
> I want to do this same process with server side (using CFM) 
> as well.  In
> other words, using a first name field as an example, I'd like 
> to replace
> the CFLOCATION statements in each check group (I could wind up with 30
> checks on the various field) with something that will "remember" the
> #val# number and then lump them all one CFLOCATION statement 
> at the end
> of the validation routine, such as:
> 
> <CFLOCATION
> URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U
> RL.pID#&va
> l=19a, 19b, etc." ADDTOKEN="No">
> 
> The &val= appendage would be dynamic, only having those 
> values which did
> not pass the server-side validation.
> 
> How would I accomplish something like this?
> 
> ==============================================
> 
> <!--- First Name --->
>               <!--- Check that the field is required, 19a --->
>               <CFLOCK SCOPE="SESSION" TIMEOUT="10" TYPE="READONLY">
>                       <CFIF SESSION.ecom.firstname IS "">
>                               <CFLOCATION
> URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U
> RL.pID#&va
> l=19a" ADDTOKEN="No">
>                       </CFIF>
>               </CFLOCK>
>               
>               <!--- Check that the field has only alphabetical
> characters, 19b --->
>               <CFLOCK SCOPE="SESSION" TIMEOUT="10" TYPE="READONLY">
>                       <CFSET VARIABLES.testFirstName =
> #IsAlphabet(SESSION.ecom.firstname)#>
>               </CFLOCK>
>                       <CFIF VARIABLES.testFirstName IS "No">
>                               <CFLOCATION
> URL="#REQUEST.webroot##REQUEST.Ssubwebroot#/default.cfm?pID=#U
> RL.pID#&va
> l=19b" ADDTOKEN="No">
>                       </CFIF>
> 
>  
> ===============================================
> 
> Thanks,
> Mark
> 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


Reply via email to