Link to home
Create AccountLog in
Avatar of me24hour
me24hourFlag for United States of America

asked on

sharepoint 2010 jquery validation plugin not working

I am using the jQuery validation plug-in,to validate a form.  It i try to submit a form that is not valid, it gives a validation error and that is fine. However, when I submit the form again after making all the corrections, I cannot submit the form.
Please help !!
Here is the code:
(function ($) {
    $.fn.moveTo = function (selector) {
        return this.each(function () {
            var cl = $(this).clone();
            $(cl).appendTo(selector);
            $(this).remove();
        });
    }
})(jQuery);

$(document).ready(function () {

    // Remove all of the content from the recaptchalistitem li element
    $("li.recaptchalistitem").empty();

    // Move the recaptchaContainer div into the recaptchalistitem li element
    $("div.recaptchaContainer").moveTo("li.recaptchalistitem");
    $("div.recaptchaContainer").show();

    // Make the recaptcha a required field
    //$("#recaptcha_response_field").attr("class", "required");

    // Set up the form for validation
    $("#aspnetForm").validate();
});

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account