I was wondering if it is possible to place 2 submit buttons if send either of its information when click.
Example:
<form method="post" action="content/requests/index.cs.asp?Process=RespondRequests" id="REQUESTFORM">
<input type="hidden" name="REQUESTID" value="<%=objRequests("REQUESTID")%>">
<input type="hidden" name="BYID" value="<%=objRequests("BYID")%>">
<input type="hidden" name="TOID" value="<%=objRequests("TOID")%>">
<input type="submit" name="respond" value="Confirm" class="btn_confirm" />
<input type="button" name="respond" value="Ignore" class="btn_ignore" />
</form>
Given your code there, if you change the ignore button to be type="submit"
then it'll do what you want.
In the POST, you'll see this:
// if Confirm clicked:
REQUESTID -> requestId
BYID -> byId
TOID -> toId
respond -> Confirm
// if Ignore clicked:
REQUESTID -> requestId
BYID -> byId
TOID -> toId
respond -> Ignore
Remember, hitting enter on the form is like clicking on the submit button that appears first in your source.
Just set them both to type="submit". It will already do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With