I have an if condition, Based on that I need to generate a popup for printing some PDFs.
Here is the code
<HTML:form action="action.do" >
<% if(condition()) {%>
<span>
<input type="button" onclick="javascript:cancel1()" property="" Class = "bSwan" tabindex="7" value="Cancel" />
<input type="button" id="submit" property="" Class = "bSwan" tabindex="7" value="save" />
<div id="pay_dialog" title="Dialog Title">
<form id="auth_form">
<input type="button" value="Print Authorization Form" id="printpdf" property="" Class = "bSwan" tabindex="7" />
<input type="submit" value="Submit" id="submit_form" property="" Class = "bSwan" tabindex="7" />
</form>
</div>
</span>
<%}else{%>
<span>
<input type="button" onclick="javascript:cancel1()" property="" Class = "bSwan" tabindex="7" value="Cancel" />
<html:submit property="" styleClass = "bSwan" onclick="" tabindex="7">
<bean:message key="global.button.Save" />
</html:submit>
</span>
<% } %>
</HTML:form>
Can I have <form id="auth_form" action="action.do"> ?
I mean in both the condition I need the same value on form to be submitted to the same action.