Index: E:/sandbox/ofbiz/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java =================================================================== --- E:/sandbox/ofbiz/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (revision 7745) +++ E:/sandbox/ofbiz/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (working copy) @@ -785,6 +785,8 @@ ModelFormField modelFormField = submitField.getModelFormField(); ModelForm modelForm = modelFormField.getModelForm(); String singleClickAction = " onClick=\"javascript:submitFormDisableButton(this)\" "; + String event = null; + String action = null; if ("text-link".equals(submitField.getButtonType())) { buffer.append(""); } else { // default to "button" @@ -854,9 +866,20 @@ buffer.append('"'); } - // add single click JS onclick - buffer.append(singleClickAction); + event = modelFormField.getEvent(); + action = modelFormField.getAction(); + if (UtilValidate.isNotEmpty(event) && UtilValidate.isNotEmpty(action)) { + buffer.append(" "); + buffer.append(event); + buffer.append("=\""); + buffer.append(action); + buffer.append('"'); + } else { + //add single click JS onclick + buffer.append(singleClickAction); + } + buffer.append("/>"); }