We have a form which has a submit button (input type="submit") and a bunch of a4j:mandButtons which are ajax buttons that translate into input type="button".
I'm able to use this jquery code to prevent double submitting of the submit button:
$('#createPostingForm').submit(function(){
$(':submit').click(function() {
return false;
});
});
But how can I also disable the a4j:mandButtons from being submitted more than once?
Thanks.
We have a form which has a submit button (input type="submit") and a bunch of a4j:mandButtons which are ajax buttons that translate into input type="button".
I'm able to use this jquery code to prevent double submitting of the submit button:
$('#createPostingForm').submit(function(){
$(':submit').click(function() {
return false;
});
});
But how can I also disable the a4j:mandButtons from being submitted more than once?
Thanks.
Share Improve this question edited Nov 23, 2010 at 20:07 RichFaces4Life asked Nov 23, 2010 at 20:01 RichFaces4LifeRichFaces4Life 1411 silver badge5 bronze badges1 Answer
Reset to default 8Ended up adding these attributes to the a4j:mandButton:
onclick="this.disabled=true" onplete="this.disabled=false"