Mario Moura schrieb:
Jörn
Like I said I am not sure about this. Please I am not criticize
anyone. I love your Validation. Works Fine.
My form have a ajax button. Something like this
<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"/>
So I have Two submit buttons into the same form. One is Ajax and other
is to submit the form.
When I click in "ajax submit button" Validation Plugin think I am
trying send my form but it is not true.
SeVir tried help-me with this function:
$("#attach-button").click(function(){
$("#myform")[0].submit(); //DOM submit trigger, not jQuery
submit trigger
return false;
});
but didnt work and I will try others suggestion of SeVir.
You can see the only common thing between two "input" fields is the
type ==> <input type="submit" ...>
So I only can imagine that in some place into plugin tell to acept all
submit buttons or IF NOT should have a function to avoid this (acept
all submit clicks)
Did you try to add a click-handler to your ajax-submit-button and return
false from there? That should prevent the form submit completely,
therefore no validation can occur.
-- Jörn