开发者

Prevent double submit with a4j:commandButton

We have a form which has a submit button (input type="submit") and a bunch of a4j:commandButtons 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:commandButtons from being submitted more than once?

Thanks.


Ended up adding these attributes to the a4j:commandButton:

onclick="this.disabled=true" oncomplete="this.disabled=false"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜