[jboss-user] [JBoss Seam] - Re: How to prevent double submit

fhh do-not-reply at jboss.com
Fri Jul 27 14:14:36 EDT 2007


Or you can use this javascript hack:


  | <script>
  | function disableButtons(formular)
  | {
  | 
  |    for (var iter = 0; iter < formular.elements.length; iter++) {
  | 
  |      if (formular.elements[iter].type == "submit" 
  |             || formular.elements[iter].type == "button" 
  |             || formular.elements[iter].type == "reset") 
  |      {
  | 
  |        formular.elements[iter].disabled = true;
  | 
  |       }
  |     }
  |   }
  | <script>
  | <h:form onsubmit="disableButtonsAfterSubmit(this);">...</h:form>
  | 

Regards

Felix


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068323#4068323

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068323



More information about the jboss-user mailing list