This content has been marked as final.
Show 1 reply
-
1. Re: Disabling a h:commandButton in the onclick event, it does avoid the submit!
ealonso04 Oct 9, 2012 1:29 PM (in response to ealonso04)Hi there! I found the solution!
It seems that once you have clicked the button it doesn't do anything since the disabling tells to the button not to do anything else.
I found this with jQuery:
$('form').submit(function(e){
$('input[type=submit]').each(function(){
$(this).attr("disabled", "disabled");
});
});
This code disables all the submit buttons inside the form and disable them while the submit is done.
Regards!