I am not sure advocating the reduction to one level is all accepted.  AJAX
validation is great when JS is on and it works for the client browser.  In
the advent that those two conditions do not exist, additional steps need to
be taken.  Either you programmatically deny permission to execute the page
because they do not have JS on or their browser is not in the correct target
market or you create a catch all second server layer of validation.  Server
validation is more traffic and an extra step for the developer.

What is an extra step when your first deviant user gets through your first
line of validation?  I see that a lot of developers can write server side
validation quicker than they can with JS.  The fact of the matter is that CF
does make it easy and quick to check a great deal of data types and string
patterns.

Reducing the amount of validation is not a "pro" for using AJAX.  It is a
consideration that has consequence.  If you want to create a unified
validation process, have the same component used for the remote call from
AJAX be the same component that your action page would user.  This would
introduce homogenous validation and a good example of code resuse.

Teddy

On 10/16/06, Snake <[EMAIL PROTECTED]> wrote:
>
> Claude,
>
> If the client has Javascript Disabled then you cannot do any clientside
> validation at all, so it makes no difference.
> As an AJAX call only sends/returns a very small amount of data, it is very
> quick, and is still quicker than server side only validation if the client
> has Javascript enabled.
> It means you do not have to write two separate validation routines, and if
> you are using AJAX in your site anyway, it will save code and loading time
> as well.
>
> Russ
>
> -----Original Message-----
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: 15 October 2006 22:47
> To: CF-Talk
> Subject: Re: Form Validation Custom Tag
>
> >>You could create a CFC that does all your validation, and use the same
> CFC for client side validation (via AJAX) and server side.
>
> Ajax or not, the idea is that I consider particularly awkward and
> cumbersome
> to interrogate the server just to confirm that a string is indeed an
> integer
> value, or a valid date in the calendar. This should definitely be done in
> Javascript in the client's browser.
> What if the client has Javascript deactivated?
> Then you have no Ajax either...
>
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256869
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to