Hi, guys...

I usually do all my validation using CF, by submitting
a form back to the page it's on, however, I thought I'd
give jQuery a crack at validation.  While it works fine
for the functions that are built-in, they are somewhat limited in function
and I quickly get lost in a lot of code when it comes to custom validation,
such as validating and reformatting dollar values for processing.

What I'm wondering is if I can use jQuery validation, such
as Jorn's Validation plug-in, which I've been working with,
but use calls to CF pages with CF code for validation and
formatting and returning the values to the form.

I've been using Jorn's Validation plug-in, then once all the form
entries are correct, the form values are posted out
with a $.post call to a .cfm page where calculations are run
on the form values, then the result is returned to the calling page.

What I'm getting around to asking is if I can use CF code
on separate pages and have a form field value sent to a
.cfm page "onblur" for validation using CF code, then have the resulting
value returned to the calling page after processing and/or formatting
and reinserted back into the form field.

I don't know if this makes any sense to anyone.

Let me know if it doesn't and I'll try to clarify.

For example... I use this function to calculate a mortgage payment
once all form values are valid:

        function CalculateMortgage(){

            var Params = {};

            // select all inputs of type text
            $("input:text").each(function(){
            Params[$(this).attr("name")] = $(this).val();
            }); // closes input:text function

            // "post" the form.  The Param object mimics form fields
            $.post("Mortgage_Calculation.cfm", Params, function(data){
            // this is the processing function.
         
            // append what you get back to the element with ID = Result
after clearing its contents
            $("#Result").empty().append(data);
        
            } // closes post function
            ); // closes ( after .post 
        } // closes { after CalculateMortgage = function() {


Can I functions that call .cfm pages to process and validate
individual form fields "onblur" or some other key action?

Rick



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to