Hi SeVir and Jörn, Yes I was thinking about this tonight. I need avoid the click event.
$("#attach-button").each(function(){ $(this).bind("click", function(){ $("#node-form")[0].submit(); return false; }); }); I tested your function but I can only click attach-button one time. The second click dont work.(I cant attach more files) I made a lot of variations. I was thinking insert another function to unbind the event or something like this. So I tried but dont work $("#attach-button").each(function(){ $(this).bind("click", function(){ $("#node-form")[0].submit( function() { $("#attach-button").unbind(); } ); return false; }); }); Ideas? Regards Mario 2007/8/23, SeViR <[EMAIL PROTECTED]>: > > > Mario Moura escribió: > > Hi SeVir and Folks > > > > > > My form have a ajax button. Ajax button always is type="submit" so I > > tested ValidationAide and Jquery Validation (bassistance.de > > <http://bassistance.de>) > > > > Both plugins have the following bad behavior. > > > > When I click in Ajax Button (value="Attach" id="attach-button" > > name="attach") both think that I am trying send the form and try > validate. > > > > So My Ajax function cant work :( > > > > Can I bypass this? How can I hack this? Ideas? > > > > How can I say to "Jquery Validation" to validate id="edit-submit" and > > not type="submit"? Or how can exclude id="attach-button" from > Validation? > > > > Because $("#myform").validate(); already declared. > > > > My Form is: > > > > > > <form enctype="multipart/form-data" id="myform" method="post" > > action="/send/invoice"> > > > > <input type="submit" class="form-submit" value="Attach" > > id="attach-button" name="attach"/> > > > > <input type="submit" class="form-submit" value="Submit" > > id="edit-submit" name="op"/> > > > > </form> > > > > Regards > > > > Mario > Using any validation library, in your HTML example you can bypass the > validation using this code: > //inside document.ready > $("#attach-button").click(function(){ > $("#myform")[0].submit(); //DOM submit trigger, not jQuery submit > trigger > return false; > }); > > -- > Best Regards, > José Francisco Rives Lirola <sevir1ATgmail.com> > > SeViR CW · Computer Design > http://www.sevir.org > > Murcia - Spain > > -- Mário Alberto Chaves Moura [EMAIL PROTECTED] 31-9157-6000