Hello again! I solved my problem by following Zammetti's suggestion. Thank you all very much for your thoughts. My solutions as following. Hope it helps newbies like myself.
Thanks, Catherine JavaScript functions: // alert user if the new attribute already exists function checkNewAttribute() { var theForm = document.forms[0]; if (theForm.submitAction.value == "Add Attribute") { //comment out for clarity //1. check empty selection //2. check redundant attribute if redundant return(false); else return(true); } // set value for the hidden field "submitAction" function setSubmitAction(target) { document.forms[0].submitAction.value = target; } In JSP: <html:form action="myAction" onsubmit="return checkNewAttribute()"> ... <html:submit onclick="setSubmitAction('Add Attribute')">Add Attribute</html:submit> <html:submit onclick="setSubmitAction('Save')">Save</html:submit> <html:submit onclick="setSubmitAction('Commit')">Commit</html:submit> <html:hidden property="submitAction" value=""/> </html:form> ------------------------------------------------------------- <a href="http://Struts_User_List.roomity.com">roomity.com</a> roomity.com is broadband internet. ~~1127762426088~~ -------------------------------------------------------------