I´m with same trouble but that didnt work for me $("#envia_quest").validate({ errorPlacement: function(error, element) { error.appendTo( element.parents("ul").find("li.aki_erro") ); }, submitHandler: function(form) { jQuery(form).ajaxForm(function(data) { if(data) alert("Obrigado por ter respondido esse questionário!"); else alert("Aconteceu algum erro!!!"); }); }//fim handler });//fim validate
This dont validate and dont submit =/ Wav validating before when i was using a type="submit" but i want to use type="button" How i can workaround this?? On 8/16/07, Freud <[EMAIL PROTECTED]> wrote: > > Well, it finally works ;) > I tried an other syntax and it went good. > Here comes the code, if it could help : > > $("#interv").validate({ > errorContainer: $("#alertes"), > errorLabelContainer: $("#alertes ul"), > errorWrapper: "li", > rules: { > int_societe: { required: true } > }, > messages: { > int_societe: "Test soc" > }, > submitHandler: function(form) { > $("#interv").ajaxSubmit({ > success: ValidatInterv, > target: "#alertes2", > url: > "soa.php?action=modif" > }); > } > }); > > Thanx for the help, > Freud > > > On Aug 16, 8:53 am, Freud <[EMAIL PROTECTED]> wrote: > > Hi, > > > > first of all, excuse me for my language, I'm french ;) so I'll try to > > make it simple... > > > > I'm using the JQuery Form Plugin and it works perfectly fine : > > > > $(document).ready(function() { > > var options2 = { > > target: "#alertes", > > url: "soa.php?action=modif" > > }; > > > > $("#interv").submit(function() { > > $(this).ajaxSubmit(options2); > > return false; > > }); > > > > }); > > > > I tried the validation form plugin, which is quite amazing, and it > > also works great. > > > > $(document).ready(function() { > > $.validator.setDefaults({ > > errorContainer: $("#alertes"), > > errorLabelContainer: $("#alertes ul"), > > errorWrapper: "li", > > rules: { > > int_societe: { required: true } > > }, > > messages: { > > int_societe: "Test soc" > > } > > //,submitHandler: function(form) {$ > > ("#interv").ajaxSubmit(options2);}, > > }); > > $("#interv").validate(); > > > > }); > > > > Now, I wanna use both. That's where it started to go wrong. When I > > uncomment the SubmitHandler line, the validation is still OK but the > > form is submitted normally, not using the Ajaxian method. > > > > Could someone help me on this case ? I spent my night on this stuff > > and I start feeling depressed :) > > > > Thx, > > Freud > > -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com