I have a page with two buttons for creating a pdf and an excel. But only one of them will work. The forms are nearly the same. How can I make both buttons work. Maybe with an id for the forms? Javascript?
<portlet:actionURL var="createExcel">
<portlet:param name="action" value="createExcelorConstrainSearch" />
</portlet:actionURL>
<portlet:actionURL var="createPdf">
<portlet:param name="action" value="createPDForConstrainSearch" />
</portlet:actionURL>
<form:form commandName="tg35FormBackingModel" action="${createExcel}" method="post">
<form:form commandName="tg35FormBackingModel" action="${createPdf}" method="post">
<div>
<table>
<tr>
....
</form:form>
</form:form>
<button type="submit" name="PDF"></button>
<button type="submit" name="EXCEL"></button>