Rick,

>Does the JS and CF validation have to be totally independent
>in functionality?  It would seem so, if I'm concerned about a user
>not being able to use forms.
>
>I've got a technique I'm working on that involves JS posting a form
>back to the page it's on, then cfincluding a page of CF to validate
>the form data.
>
>After validation, I'm using the taconite plug-in to place error messages.

This method is terrible inefficient for general validation (required fields,
validating values, etc.) Not only have you added several layers of
complexity, but you're almost completely voiding the benefits of client-side
validation.

I also know from some of your example code posts on mailing lists, you were
doing most of these AJAX validation during a blur event of a field. This is
going to generate a lot of server traffic--traffic that isn't necessary.

You should only be doing AJAX validation when you can not do the validation
on the client-side (such as validating against a database.)

Just make sure you using AJAX to solve real problems, not just so you can
say you're using it. This means don't use AJAX to submit a form when you're
just going to reload a page if it's successful. You're making your code
unnecessarily complicated. 

It should be used when you're just going to update a portion of your
DOM--loading in a document fragment. For example, if you have a commenting
system similar to most blogs. Instead of reloading the entire page when a
user enters a comment, you could post there comment (and any new comments
since their page loaded) and insert that document fragment.

-Dan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

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

Reply via email to