I've got a way for using the Dreamweaver's Spry form validation along
with the jQuery "form" plugin for submitting form via ajaxSubmit.

Here is the simple code that you need in the “beforeSubmit” parameter
of $.ajaxForm

$("#formID").ajaxForm({
    url: "submit.php",
    beforeSubmit: function(formData, jqForm, options){
        if (Spry) { // checks if Spry is used in your page
            var r = Spry.Widget.Form.validate(jqForm[0]); // validates
the form
            if (!r)
                return r;
        }
    },
    success: successFunction,
    complete: completeFunction
});

For details please visit:
http://abcoder.com/javascript/using-dreamweaver-spry-validation-with-jquery-ajax-form-plugin/

Hope this'll help you a lot.

Thanks
Adnan

Reply via email to