Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Gian-ava
Oh, for posterity, in case anybody else find this useful, here is the complete code that worked fine for me. $(document).ready(function(){ $('#actionform').validate({ errorPlacement: function(error, element) { $(element).closest('.rowElem'

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Gian-ava
Leonardo, today you're my man! It finally worked! THAT was what I was looking for. I can't tell you how long I've been trying to achieve just that result, so you can't imagine how much I appreciate your help. Really, thanks! I actaully had found a workaround to place the error mesage with just

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Leonardo K
Every input element is wrapped in a div with class 'rowElem'? So your errorPlacement should be something like this: errorPlacement: function(error, element) { $(element).closest('.rowElem').after(error); //the method closest get the closest parent with class rowElem }, On Mon, Dec 14, 2

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Gian-ava
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) {

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Leonardo K
The debug:true only work with firebug (extension for firefox). The messages will appear in console On Mon, Dec 14, 2009 at 11:50, Gian-ava wrote: > > Leonardo, thanks for your interest in my case. > > I've tried out the code with the debug option. I just don't know what the > debug function will

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Gian-ava
Leonardo, thanks for your interest in my case. I've tried out the code with the debug option. I just don't know what the debug function will generate and where I need to look to see the result. Otherwise, again, your code doesn't get validation to work. This one do work: $(document).ready(func

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Leonardo K
Try to use the debug:true option to find what's going on. Check if the form has the id=actionform. $('#actionform').validate({ debug:true, submitHandler: function(form) { $(form).ajaxSubmit({ success: function() { $('#actionform').hide();

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Gian-ava
Hi Leonardo, Thanks for answering. Unfortunately, the validation doesn't work at all with the code you provided: the form is sent even if the required fields are empty. Any hint? Leonardo K wrote: > > This should work: > > $(document).ready(function(){ >$('#actionform').validate({ >

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Leonardo K
This should work: $(document).ready(function(){ $('#actionform').validate({ submitHandler: function(form) { $(form).ajaxSubmit({ success: function() { $('#actionform').hide(); $('#content').append("Thanks! Yo

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Gian-ava
Oh c'mon, nobody who can helo me out with this? Nobody who can figure out how to code the right errorPlacement to place the error label where I need it? -- View this message in context: http://old.nabble.com/Validation-Plugin%3Aneed-help-with-errorPlacement-tp26719238s27240p26769256.html Sent f

[jQuery] Validation Plugin:need help with errorPlacement

2009-12-09 Thread Gian-ava
Hi, I am using the Validation Plugin from Bassistance (by Jörn Zaefferer) and I need to append the error message after the not after the input field. This is the HTML I get: Country