admin管理员组文章数量:1328558
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"
本文标签: javascriptPrevent double submit with a4jcommandButtonStack Overflow
版权声明:本文标题:javascript - Prevent double submit with a4j:commandButton - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742250503a2440667.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论