I have the following problem that I can't solve:
I have this form into an HTML table:
<th width = "8.33%">
<form id="actionButton" action="salwf.do?serv=1" method="post">
<button name="accept" value="Accept" type="submit" class="acceptButton">ACCEPT ICON BUTTON</button>
<button name="cancel" value="Cancel" type="submit" class="cancelButton">CANCEL ICON BUTTON</button>
<button name="sap" value="SAP" type="submit" class="sapButton">SAP ICON BUTTON</button>
<input id="testId" name="test" type="hidden">
</form>
</th>
As you can see this form contains three jQuery button elements and an hidden input tag.
I need to create a JavaScript that do the following operations: when the user click on one of the previous three buttons it take the value of the clicked button (Accept or Cancel or SAP) and submit it (in a POST request).
Can I do something like this using JavaScript? How can I implement it?