Leonardo,

I see. Firebug' error console says:

Error: missing ) after argument list
Line: 8, Column: 12
Source Code:
            }

Strange, since I don't think this  is correct.

Also, it says:
Error: syntax error
Line: 7, Column: 30
Source Code:
      errorPlacement: function(error, element) { 

Again, I don't see any error there.

Anyway, if I write this, the error label gets printed after the .roxElem,
but for each required field I get as many error labels as I defined (ex: I
got 4 required fields, so for rowElem I get the 4 messages):

$$(document).ready(function(){
        $('#actionform').validate({

                errorPlacement: function(error, element) {
                        error.insertAfter(".rowElem");
                },
                        
                submitHandler: function(form) {
             
                        $(form).ajaxSubmit({
                       
                    success: function() {
                        $('#actionform').hide();
                        $('#content').append("<p class='thanks'>Thanks! Your
request has been sent.</p>")
                    }
               });
             }
         
    });
});

I can't believe it is so difficult to control where to display the error
message. The problem is that since I use jqtransform plugin, the latter
prints and wraps all fields into a lot of stuff fot styling elements, and
when the validation plugin prints the error label after the input field, it
actually display IN the field. I want it out of the field, so I need it to
be printed after the .rowElem.

Where's the plugin author?
-- 
View this message in context: 
http://old.nabble.com/Validation-Plugin%3Aneed-help-with-errorPlacement-tp26719238s27240p26780208.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to