I want to dynamically change the function value of the submitHandler:
method. How can I do this?


Here is some sample code:

----------------
                $('#update_inventory').validate({
                        submitHandler: function(form) {
                                                                        
$(form).ajaxSubmit({
                                                                                
target: '#inventory',
                                                                                
success: parseResponse
                                                                        });
                                                                },
                        debug: true,
                        errorElement: "em",
                        errorContainer: $("#warning, #summary"),
                        errorPlacement: function(error, element) {
                                error.appendTo( 
element.parent("span").next("span") );
                        },
                        success: function(label) {
                                label.text("ok!").addClass("success");
                        }

                });

Reply via email to