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'
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
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
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) {
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
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
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();
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({
>
This should work:
$(document).ready(function(){
$('#actionform').validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
success: function() {
$('#actionform').hide();
$('#content').append("Thanks! Yo
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
10 matches
Mail list logo