I've been having similar issues, and your solution really helped, but
i think it introduced another problem.

if I retrieve the same form again, so loaded the form a second time
via ajax, the form tries to validate, but then submits anyway. Kinda
strange.

My code looks like this
[ code]
 function validateEmpAJAX(){

$('#addEmpForm').validate({
                currentForm : $('#addEmpForm'),
                submitHandler: function(){
            var options = {
        target:        '#addEmpForm',   // target element(s) to be
updated with server response
        beforesubmit: showRequestaddEmp,
        success: showResponseaddEmp
    };



    $('#addEmpForm').livequery('submit', function() {

        $(this).ajaxSubmit(options);
        return false;
    });
        }
});
        function showRequestaddEmp(formData, jqForm, options) {

        var queryString = $.param(formData);



         $("form#addEmpForm").html(loading);

        }

        function showResponseaddEmp(options)  {
            $.ajax({
                                type: "POST",
                                url: "processes/getEmployees2.php",
                                data: "uid="+newuid+"&refresh=u2",
                                success: function(response){
                                        $(".employees").append(response);
                                $("#addEmpForm").fadeOut("slow");
                                        }
                        });

        }

[/code]

I've tried .livequery and unbinding items, but it doesn't seem to
work.

Reply via email to